Displaying 13 results from an estimated 13 matches for "getlastarg".
2018 Aug 09
2
ArgList flag values
I've come across a need to know whether an option was set true, false or
unspecified. If it is true I want to do one thing, if it is false I
want to do something else and if it is unspecified I want to do nothing.
ArgList::hasFlag is a convenient way to check true/false with a default
value. An ArgList::hasFlag that returned Optional<bool> would allow
checking the unspecified case.
2018 Mar 01
0
[cfe-dev] Disabling vectorisation at '-O3'
No, I’m wrong. I think that bug is actually in ‘hasFlag’ itself. In ‘llvm/lib/Option/ArgList.cpp’ line #70:
bool ArgList::hasFlag(OptSpecifier Pos, OptSpecifier PosAlias, OptSpecifier Neg,
bool Default) const {
if (Arg *A = getLastArg(Pos, PosAlias, Neg))
return A->getOption().matches(Pos) || A->getOption().matches(PosAlias);
return Default;
}
This doesn’t match when ‘Neg’ is matched, and should probably be:
bool ArgList::hasFlag(OptSpecifier Pos, OptSpecifier PosAlias, OptSpecifier Neg,...
2018 Mar 01
0
[cfe-dev] Disabling vectorisation at '-O3'
...torisation at '-O3'
No, I’m wrong. I think that bug is actually in ‘hasFlag’ itself. In ‘llvm/lib/Option/ArgList.cpp’ line #70:
bool ArgList::hasFlag(OptSpecifier Pos, OptSpecifier PosAlias, OptSpecifier Neg,
bool Default) const {
if (Arg *A = getLastArg(Pos, PosAlias, Neg))
return A->getOption().matches(Pos) || A->getOption().matches(PosAlias);
return Default;
}
This doesn’t match when ‘Neg’ is matched, and should probably be:
bool ArgList::hasFlag(OptSpecifier Pos, OptSpecifier PosAlias, OptSpecifier Neg,...
2015 Jul 22
2
[LLVMdev] (no subject)
Hello,
I have tried a lot fix this error but am not able to can you please
find me a solution am trying to compile the SAFECode in Cygwin Environment
to work for windows.
used make -j4 command to make the files in cygwin i have got this error
make[5]: Leaving directory
'/home/uidr7475/Work/LLVM_OBJ/projects/safecode/tools/clang/include'
/usr/bin/cp: cannot stat
2013 Aug 22
3
[LLVMdev] [NEW PATCH] X32 ABI support for Clang/compiler-rt (Clang patch)
...river/Driver.cpp.orig 2013-08-22 14:07:13.397091755
+0000
+++ tools/clang/lib/Driver/Driver.cpp 2013-08-22 14:05:55.275249307
+0000
@@ -1897,6 +1897,8 @@
// Handle pseudo-target flags '-m32' and '-m64'.
// FIXME: Should this information be in llvm::Triple?
if (Arg *A = Args.getLastArg(options::OPT_m32, options::OPT_m64)) {
+ if (Target.getEnvironment() == llvm::Triple::GNUX32)
+ Target.setEnvironment(llvm::Triple::GNU);
if (A->getOption().matches(options::OPT_m32)) {
if (Target.getArch() == llvm::Triple::x86_64)
Target.setArch(llvm::Triple::x86);...
2013 Aug 22
0
[LLVMdev] [RFC PATCH] X32 ABI support for Clang/compiler-rt (Clang patch)
...--- ./tools/clang/lib/Driver/Driver.cpp.orig
+++ ./tools/clang/lib/Driver/Driver.cpp
@@ -1700,6 +1700,9 @@ static llvm::Triple computeTargetTriple(StringRef
DefaultTargetTriple,
if (Target.getArch() == llvm::Triple::ppc)
Target.setArch(llvm::Triple::ppc64);
}
+ } else if (Args.getLastArg(options::OPT_mx32)) {
+ if (Target.getArch() == llvm::Triple::x86_64)
+ Target.setEnvironment(llvm::Triple::GNUX32);
}
return Target;
--- ./tools/clang/lib/Basic/Targets.cpp.orig 2013-08-18
12:00:04.501402572 +0000
+++ ./tools/clang/lib/Basic/Targets.cpp 2013-08-18 12:08:11.08617566...
2013 Aug 22
7
[LLVMdev] [RFC PATCH] X32 ABI support for Clang/compiler-rt
Hi,
I'm working on bringing up complete coverage for a Gentoo x32 "desktop"
system. I've been cooking up quite a few patches for various packages
to push upstream, but right now, the biggest blocker is the lack of
support for building with/codegen targeting x32 in llvm/clang. Since
the x32 patches were sent last year, I see support code has landed in
LLVM, and basic handling of
2017 Nov 06
5
RFC: Debug info for Cuda
Hi everybody,
As you know, Cuda/NVPTX target has very limited support of the debug info in Clang/LLVM. Currently, LLVM supports only emission of the line numbers debug info.
This is caused by limitations of the Cuda/NVPTX codegen. Clang/LLVM translates the source code to LLVM IR, which is then lowered to PTX (parallel thread execution) intermediate file. This PTX file represents special kind of
2015 Jul 30
0
[LLVMdev] The Trouble with Triples
Hi Daniel,
> (from the context, you might have meant 'tuple' where you've written
> 'triple'. I'm answering based on the assumption you meant 'triple')
>
>
I did mean what I wrote.
> The GNU triple is already used as a way of encoding a large amount of the
> target data in a string but unfortunately, while this data is passed
> throughout
2017 Aug 01
2
[RFC] Profile guided section layout
...f (!to_integer(Fields[0], Count))
+ fatal("parse error");
+ StringRef From = Fields[1];
+ StringRef To = Fields[2];
+ Config->CFGProfile[std::make_pair(From, To)] = Count;
+ }
+}
+
static bool getCompressDebugSections(opt::InputArgList &Args) {
StringRef S = Args.getLastArgValue(OPT_compress_debug_sections, "none");
if (S == "none")
@@ -727,6 +744,10 @@ void LinkerDriver::readConfigs(opt::InputArgList &Args) {
if (Optional<MemoryBufferRef> Buffer = readFile(Arg->getValue()))
Config->SymbolOrderingFile = getLines(*Buff...
2015 Jul 30
3
[LLVMdev] The Trouble with Triples
Hi Eric,
Thanks for getting back to me on this.
> I'm not sure I agree with the basic idea of using the target triple as a way of
> encoding all of the pieces of target data as a string. I think in a number of
> cases what we need to do is either open up API to the back end to specify things,
> or encode the information into the IR when it's different from the generic triple.
2017 Jul 31
2
[RFC] Profile guided section layout
...63ba7b..84d4d80 100644
--- a/ELF/Driver.cpp
+++ b/ELF/Driver.cpp
@@ -644,6 +644,7 @@ void LinkerDriver::readConfigs(opt::InputArgList &Args) {
Config->LTOO = getInteger(Args, OPT_lto_O, 2);
Config->LTOPartitions = getInteger(Args, OPT_lto_partitions, 1);
Config->MapFile = Args.getLastArgValue(OPT_Map);
+ Config->NoCFGProfileReorder = Args.hasArg(OPT_no_cfg_profile_reorder);
Config->NoGnuUnique = Args.hasArg(OPT_no_gnu_unique);
Config->NoUndefinedVersion = Args.hasArg(OPT_no_undefined_version);
Config->NoinhibitExec = Args.hasArg(OPT_noinhibit_exec);
diff --git...
2014 Nov 03
8
[LLVMdev] [PATCH] Protection against stack-based memory corruption errors using SafeStack
...StringRef Sanitizer,
bool Shared) {
@@ -3675,7 +3698,14 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
// -stack-protector=0 is default.
unsigned StackProtectorLevel = 0;
- if (Arg *A = Args.getLastArg(options::OPT_fno_stack_protector,
+ if (Args.hasFlag(options::OPT_fsafe_stack,
+ options::OPT_fno_safe_stack, false)) {
+ StackProtectorLevel = LangOptions::SSPSafeStack;
+ Args.ClaimAllArgs(options::OPT_fno_stack_protector);
+ Args.ClaimAllArgs(options::OPT_fstack_prote...