- Aug 16, 2014
-
-
Sean Silva authored
There is more cleanup to be done here. Once llvm::sys::Process::GetArgumentVector is switched over to StringSaver, we can simplify this code a fair amount. llvm-svn: 215785
-
Sean Silva authored
This class is generally useful. In breaking it out, the primary change is that it has been made non-virtual. It seems like being abstract led to there being 3 different (2 in llvm + 1 in clang) concrete implementations which disagreed about the ownership of the saved strings (see the manual call to free() in the unittest StrDupSaver; yes this is different from the CommandLine.cpp StrDupSaver which owns the stored strings; which is different from Clang's StringSetSaver which just holds a reference to a std::set<std::string> which owns the strings). I've identified 2 other places in the codebase that are open-coding this pattern: memcpy(Alloc.Allocate<char>(strlen(S)+1), S, strlen(S)+1) I'll be switching them over. They are * llvm::sys::Process::GetArgumentVector * The StringAllocator member of YAMLIO's Input class This also will allow simplifying Clang's driver.cpp quite a bit. Let me know if there are any other places that could benefit from StringSaver. I'm also thinking of adding a saveStringRef member for getting a stable StringRef. llvm-svn: 215784
-
Enrico Granata authored
llvm-svn: 215783
-
Zachary Turner authored
llvm-svn: 215782
-
Nick Kledzik authored
llvm-svn: 215781
-
Nico Weber authored
llvm-svn: 215780
-
Robin Morisset authored
These methods are available on AtomicOrdering values, and will be used in a later separate patch. llvm-svn: 215779
-
Eric Christopher authored
warnings we compile with because of SWIG generated code. llvm-svn: 215778
-
Robin Morisset authored
llvm-svn: 215777
-
Nico Weber authored
llvm-svn: 215776
-
Zachary Turner authored
More specifically, this change can be summarized as follows: 1) Makes an lldbHostPosix library which contains code common to all posix platforms. 2) Creates Host/FileSystem.h which defines a common FileSystem interface. 3) Implements FileSystem.h in Host/windows and Host/posix. 4) Creates Host/FileCache.h, implemented in Host/common, which defines a class useful for storing handles to open files needed by the debugger. Differential Revision: http://reviews.llvm.org/D4889 llvm-svn: 215775
-
Sean Silva authored
llvm-svn: 215774
-
Sean Silva authored
I've shied away from ArrayRef'izing CompilerInvocation::CreateFromArgs in this commit because that is a less localized change. llvm-svn: 215773
-
Chad Rosier authored
Phabricator Revision: http://reviews.llvm.org/D4935 llvm-svn: 215772
-
Jason Molenda authored
llvm-svn: 215771
-
Nick Kledzik authored
Currently, if you use a MultiArg<> option, then printing out the help/usage message will cause an assert. This fixes getOptionHelpName() to work with MultiArg Options. llvm-svn: 215770
-
Jonathan Roelofs authored
llvm-svn: 215769
-
David Blaikie authored
A little test case simplification - this could be simplified further, though there are certainly interesting connections to the if/else construct so I'm hesitant to remove that entirely though it does appear somewhat unrelated. (similar fix to r215766, related to PR19864) llvm-svn: 215768
-
Sean Silva authored
Thanks to dblaikie for the impetus to look for a better name. llvm-svn: 215767
-
David Blaikie authored
DebugInfo: Fix PR19864 better - attribute the jump at the end of a range-for loop, to the start of the loop. This avoids debuggers stepping to strange places (like the last statement in the loop body, or the first statement in the if). This is not the whole answer, though - similar bugs no doubt exist in other loops (patches to follow) and attributing exception handling code to the correct line is also tricky (based on the previous fix to PR19864, exception handling is still erroneously attributed to the 'if' line). llvm-svn: 215766
-
Rafael Espindola authored
We were setting the comdat when functions were copied in the initial pass, but not when they were linked only when we found out that they are needed. llvm-svn: 215765
-
James Dennett authored
llvm-svn: 215764
-
Alexey Samsonov authored
[TSan] Initialize flags as early as possible. Disables back coredump, accidentally enabled in r215479. Add a test. llvm-svn: 215763
-
Nick Kledzik authored
The darwin linker has an option, heavily used by Xcode, in which, instead of listing all input files on the command line, the input file paths are written to a text file and the path of that text file is passed to the linker with the -filelist option (similar to @file). In order to make test cases for this, I generalized the -test_libresolution option to become -test_file_usage. llvm-svn: 215762
-
Sean Silva authored
This also suggests some refactoring to simplify this code. Basically, a ton of complexity in this argument handling code comes from the need to save const char *'s in stable storage for pushing onto argv. It seems like llvm::cl::StringSaver can be improved to cover all the needs here. llvm-svn: 215761
-
Sean Silva authored
llvm-svn: 215760
-
Sean Silva authored
llvm-svn: 215759
-
Samuel Benzaquen authored
Reviewers: klimek Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D4910 llvm-svn: 215757
-
Sean Silva authored
llvm-svn: 215756
-
Sean Silva authored
llvm-svn: 215755
-
Sean Silva authored
llvm-svn: 215754
-
Juergen Ributzka authored
The floating-point value positive zero (+0.0) is a valid immedate value according to isFPImmLegal. As a result AArch64 FastISel went ahead and used the immediate version of fmov to materialize the constant. The problem is that the immediate version of fmov cannot encode an imediate for postive zero. Instead a fmov from the zero register was supposed to be used in this case. This fix adds handling for this special case and uses fmov from the zero register to materialize a positive zero (negative zeroes go to the constant pool). There is no test case for this, because this code is currently dead. It will be enabled in a future commit and I will add a test case in a separate commit after that. This fixes <rdar://problem/18027157>. llvm-svn: 215753
-
Juergen Ributzka authored
Note: This reapplies r215582 without any modifications. The refactoring wasn't responsible for the buildbot failures. Original commit message: Cleanup and prepare constant materialization code for future commits. llvm-svn: 215752
-
Sean Silva authored
The core logic in main() is actually pretty simple, but there's lots of stuff that has been added over time which obscures the flow of the code. In upcoming patches, I'll be pulling more stuff out of the main codepath. I'm open to naming suggestions for these helper functions. llvm-svn: 215751
-
Eric Fiselier authored
There is a similar patch up for review. I'll submit my changes via that. llvm-svn: 215750
-
Matt Arsenault authored
llvm-svn: 215749
-
Matt Arsenault authored
llvm-svn: 215748
-
Matt Arsenault authored
llvm-svn: 215747
-
Matt Arsenault authored
llvm-svn: 215746
-
Reid Kleckner authored
They can be compared for identity. llvm-svn: 215745
-