Rui Ueyama [Wed, 12 Jun 2013 19:10:33 +0000 (19:10 +0000)]
readobj: Dump PE/COFF optional records.
These records are mandatory for executables and are used by the loader.
Reviewers: rafael
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D939
llvm-svn: 183852
Alexander Kornienko [Wed, 12 Jun 2013 19:04:12 +0000 (19:04 +0000)]
Preserve newlines before block comments in static initializers.
Summary:
Basically, don't special-case line comments in this regard. And fixed
an incorrect test, that relied on the wrong behavior.
Reviewers: klimek
Reviewed By: klimek
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D962
llvm-svn: 183851
Rui Ueyama [Wed, 12 Jun 2013 18:21:36 +0000 (18:21 +0000)]
[ELF] Remove unused parameter from ELFReference c'tor.
Reviewers: shankarke
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D961
llvm-svn: 183850
Benjamin Kramer [Wed, 12 Jun 2013 18:13:05 +0000 (18:13 +0000)]
Port HTMLDiagnostics to PathV2. No intended functionality change.
llvm-svn: 183849
Eli Friedman [Wed, 12 Jun 2013 17:31:32 +0000 (17:31 +0000)]
Fix buildbot breakage on PPC64.
llvm-svn: 183847
Daniel Malea [Wed, 12 Jun 2013 16:48:33 +0000 (16:48 +0000)]
If using clang 3.4, skip tests affected by llvm.org/pr16214
- clang emits incomplete DWARF information for structures referenced via typedef
llvm-svn: 183846
Rafael Espindola [Wed, 12 Jun 2013 16:45:47 +0000 (16:45 +0000)]
Always remove an alias when we rename the target.
Should fix the dragonegg build bots.
llvm-svn: 183845
Bill Schmidt [Wed, 12 Jun 2013 16:39:22 +0000 (16:39 +0000)]
[PowerPC] Expose some calling convention functions in PPCISelLowering.h.
This is a preparatory patch for fast-isel support. The instruction
selector will need to access some functions in PPCGenCallingConv.inc,
which in turn requires several helper functions to be defined. These
are currently defined near the only use of PCCGenCallingConv.inc,
inside PPCISelLowering.cpp. This patch moves the declaration of the
functions into the associated header file to provide the needed
visibility.
No functional change intended.
llvm-svn: 183844
Rafael Espindola [Wed, 12 Jun 2013 16:35:53 +0000 (16:35 +0000)]
Convert test to FileCheck.
llvm-svn: 183843
Rafael Espindola [Wed, 12 Jun 2013 15:37:27 +0000 (15:37 +0000)]
Don't use PathV1 in CommandLine.cpp.
No functionality change.
llvm-svn: 183842
Bill Schmidt [Wed, 12 Jun 2013 15:14:42 +0000 (15:14 +0000)]
Add artificial PRED_BAD to PPC::Predicate enumeration.
Allows returning a PPC::Predicate from a function with a no-predicate
value possible. Preparatory patch for fast-isel on PPC64 ELF. No
behavioral change intended.
llvm-svn: 183841
Rafael Espindola [Wed, 12 Jun 2013 15:13:57 +0000 (15:13 +0000)]
Inline Path::isBitcodeFile into only use and remove it.
llvm-svn: 183840
Rafael Espindola [Wed, 12 Jun 2013 15:07:11 +0000 (15:07 +0000)]
Remove Path::getMagicNumber.
llvm-svn: 183839
Rafael Espindola [Wed, 12 Jun 2013 15:04:59 +0000 (15:04 +0000)]
Remove Path::hasMagicNumber.
llvm-svn: 183838
Aaron Ballman [Wed, 12 Jun 2013 15:03:45 +0000 (15:03 +0000)]
Silencing a signed vs unsigned comparison mismatch in MSVC.
llvm-svn: 183837
Rafael Espindola [Wed, 12 Jun 2013 15:02:39 +0000 (15:02 +0000)]
Remove Path::isAbsolute.
llvm-svn: 183836
Rafael Espindola [Wed, 12 Jun 2013 14:47:33 +0000 (14:47 +0000)]
Remove Path::isAbsolute().
llvm-svn: 183835
Ulrich Weigand [Wed, 12 Jun 2013 14:46:54 +0000 (14:46 +0000)]
[MC/DWARF] Support .debug_frame / .debug_line code alignment factors
I've been comparing the object file output of LLVM's integrated
assembler against the external assembler on PowerPC, and one
area where differences still remain are in DWARF sections.
In particular, the GNU assembler generates .debug_frame and
.debug_line sections using a code alignment factor of 4, since
all PowerPC instructions have size 4 and must be aligned to a
multiple of 4. However, current MC code hard-codes a code
alignment factor of 1.
This patch changes this by adding a "minimum instruction alignment"
data element to MCAsmInfo and using this as code alignment factor.
This requires passing a MCContext into MCDwarfLineAddr::Encode
and MCDwarfLineAddr::EncodeAdvanceLoc. Note that one caller,
MCDwarfLineAddr::Write, didn't actually have that information
available. However, it turns out that this routine is in fact
never used in the whole code base, so the patch simply removes
it. If it turns out to be needed again at a later time, it
could be re-added with an updated interface.
llvm-svn: 183834
Rafael Espindola [Wed, 12 Jun 2013 14:32:51 +0000 (14:32 +0000)]
Remove Path::getSuffix.
llvm-svn: 183833
Ashok Thirumurthi [Wed, 12 Jun 2013 14:26:58 +0000 (14:26 +0000)]
LLDB feature status update to mention limitations with core-file debugging and exec.
llvm-svn: 183832
Rafael Espindola [Wed, 12 Jun 2013 14:16:52 +0000 (14:16 +0000)]
Remove sys::CopyFile.
llvm-svn: 183831
Patrik Hagglund [Wed, 12 Jun 2013 14:15:21 +0000 (14:15 +0000)]
Fix 'gcc -flto' builds for unittest binaries (undefined reference to
`typeinfo for llvm::cl::GenericOptionValue').
Remove an "anchor" method for an abstract class. (This does not
increase the number of vtables.)
llvm-svn: 183830
Ulrich Weigand [Wed, 12 Jun 2013 14:14:18 +0000 (14:14 +0000)]
[PowerPC] Use assembler source in MC tests
A couple of old test cases in test/MC/PowerPC were still using
LLVM IR. Now that we have a working assembler, we can move
them to assembler tests instead:
ppc64-initial-cfa.ll
ppc64-relocs-01.ll
ppc64-tls-relocs-01.ll
llvm-svn: 183829
Rafael Espindola [Wed, 12 Jun 2013 14:11:15 +0000 (14:11 +0000)]
Remove the old file memory mapping functions.
llvm-svn: 183828
Rafael Espindola [Wed, 12 Jun 2013 13:59:17 +0000 (13:59 +0000)]
Remove Path::createFileOnDisk.
llvm-svn: 183827
Rafael Espindola [Wed, 12 Jun 2013 13:55:07 +0000 (13:55 +0000)]
Remove Path::makeExecutableOnDisk.
llvm-svn: 183826
Renato Golin [Wed, 12 Jun 2013 11:35:33 +0000 (11:35 +0000)]
Update Release Process doc
llvm-svn: 183825
Patrik Hagglund [Wed, 12 Jun 2013 08:45:39 +0000 (08:45 +0000)]
Fix gcc -flto build, by adding LLVM_ATTRIBUTE_USED to
LLVMX86CompilationCallback2, called from inline asm.
llvm-svn: 183824
Pavel Labath [Wed, 12 Jun 2013 07:45:04 +0000 (07:45 +0000)]
Fix memory corruption in CStringChecker
Summary:
"register" functions for the checker were caching the checker objects in a
static variable. This caused problems when the function is called with a
different CheckerManager.
Reviewers: klimek
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D955
llvm-svn: 183823
Enrico Granata [Wed, 12 Jun 2013 01:50:57 +0000 (01:50 +0000)]
<rdar://problem/
11914077>
If you type help command <word> <word> <word> <missingSubCommand> (e.g. help script import or help type summary fake), you will get help on the deepest matched command word (i.e. script or type summary in the examples)
Also, reworked the logic for commands to produce their help to make it more object-oriented
llvm-svn: 183822
Eli Friedman [Wed, 12 Jun 2013 01:40:06 +0000 (01:40 +0000)]
Add support for complex compound assignments where the LHS is a scalar.
Fixes <rdar://problem/
11224126> and PR12790.
llvm-svn: 183821
Greg Clayton [Wed, 12 Jun 2013 00:46:38 +0000 (00:46 +0000)]
Huge performance improvements when one breakpoint contains many locations.
325,000 breakpoints for running "breakpoint set --func-regex ." on lldb itself (after hitting a breakpoint at main so that LLDB.framework is loaded) used to take up to an hour to set, now we are down under a minute. With warm file caches, we are at 40 seconds, and that is with setting 325,000 breakpoint through the GDB remote API. Linux and the native debuggers might be faster. I haven't timed what how much is debug info parsing and how much is the protocol traffic to/from GDB remote.
That there were many performance issues. Most of them were due to storing breakpoints in the wrong data structures, or using the wrong iterators to traverse the lists, traversing the lists in inefficient ways, and not optimizing certain function name lookups/symbol merges correctly.
Debugging after that is also now very efficient. There were issues with replacing the breakpoint opcodes in memory that was read, and those routines were also fixed.
llvm-svn: 183820
Shankar Easwaran [Wed, 12 Jun 2013 00:46:37 +0000 (00:46 +0000)]
[test] fix test as the atom name is available only in DEBUG mode
llvm-svn: 183819
Enrico Granata [Wed, 12 Jun 2013 00:44:43 +0000 (00:44 +0000)]
<rdar://problem/
13299214>
Make the error message here more interesting for the user
llvm-svn: 183818
Shankar Easwaran [Wed, 12 Jun 2013 00:32:39 +0000 (00:32 +0000)]
[ELF][X86_64] Create GOT entries for external TLS symbols properly without Segfaults.
llvm-svn: 183817
Shankar Easwaran [Wed, 12 Jun 2013 00:32:35 +0000 (00:32 +0000)]
[ELF] NMAGIC support : Find the BSS section to setup the virtual address of _end.
llvm-svn: 183816
Shankar Easwaran [Wed, 12 Jun 2013 00:32:32 +0000 (00:32 +0000)]
[ELF] TBSS section has to be special cased so that it doesnot occupy memory space
llvm-svn: 183815
Enrico Granata [Wed, 12 Jun 2013 00:32:31 +0000 (00:32 +0000)]
Removing a redundant write
llvm-svn: 183814
Eli Friedman [Wed, 12 Jun 2013 00:13:45 +0000 (00:13 +0000)]
Make va_arg and argument passing to varargs functions work correctly with
AVX vectors when AVX is turned on.
Fixes <rdar://problem/
10513611>.
llvm-svn: 183813
Daniel Malea [Wed, 12 Jun 2013 00:13:43 +0000 (00:13 +0000)]
Update TestRegisters for running on Linux (filed llvm.org/pr16301)
- skip the attach cases in TestRegisters.py -- caused slowness/sigabrt
- fixed log file removal function (in case test is run with -# flag)
llvm-svn: 183812
Sean Silva [Wed, 12 Jun 2013 00:01:26 +0000 (00:01 +0000)]
[yaml2obj] Remove fragile test case.
This test case was a "sanity check"/"breathing" test case at first, but
is really fragile, which impairs changes to yaml2obj.
`test/Object/yaml2obj-elf-bits-endian.test` is much more robust and
serves as an adequate sanity check.
llvm-svn: 183811
Sean Silva [Wed, 12 Jun 2013 00:01:22 +0000 (00:01 +0000)]
80-cols
This slipped in during a hasty renaming.
llvm-svn: 183810
Eric Christopher [Tue, 11 Jun 2013 23:41:44 +0000 (23:41 +0000)]
Correct the def registers for the 8bit x86 divide instructions to
match the comments and what the instruction actually does. Noticed
on inspection.
llvm-svn: 183809
Eric Christopher [Tue, 11 Jun 2013 23:41:41 +0000 (23:41 +0000)]
Use the Copy we defined above here.
llvm-svn: 183808
Eric Christopher [Tue, 11 Jun 2013 23:41:38 +0000 (23:41 +0000)]
Formatting.
llvm-svn: 183807
Rui Ueyama [Tue, 11 Jun 2013 23:07:43 +0000 (23:07 +0000)]
[Darwin][Driver] Add unit tests.
llvm-svn: 183806
Enrico Granata [Tue, 11 Jun 2013 22:58:32 +0000 (22:58 +0000)]
Improvements to the data formatters SB API:
- exposing new accessors: formats/format, ..., that allow you to iterate over all formatters
e.g. sys_category = lldb.debugger.GetCategory("system").summary['char *']
- ensuring that C++-based synthetic children provider can at least print their description accurately, if nothing else
llvm-svn: 183805
Akira Hatanaka [Tue, 11 Jun 2013 22:36:30 +0000 (22:36 +0000)]
Fix CMakeLists.
llvm-svn: 183804
Eli Friedman [Tue, 11 Jun 2013 22:26:34 +0000 (22:26 +0000)]
Tweak r183791 so we don't print a note without a source location.
llvm-svn: 183803
Akira Hatanaka [Tue, 11 Jun 2013 22:21:44 +0000 (22:21 +0000)]
[mips] Add an IR transformation pass that optimizes calls to sqrt.
The pass emits a call to sqrt that has attribute "read-none". This call will be
converted to an ISD::FSQRT node during DAG construction, which will turn into
a mips native sqrt instruction.
llvm-svn: 183802
Rafael Espindola [Tue, 11 Jun 2013 22:21:28 +0000 (22:21 +0000)]
Move PathV2.h to Path.h
Most clients have already been moved from Path V1 to V2. The ones using V1
now include PathV1.h explicitly.
llvm-svn: 183801
Sebastian Pop [Tue, 11 Jun 2013 22:20:40 +0000 (22:20 +0000)]
ScopDetect: check region entering edges are valid.
When a region header is part of a loop, then all entering edges of this region
should not come from the loop but outside the region. Otherwise, the loop may be
only partially part of the region, which would cause troubles in handling
induction variables.
Currently, we can only model induction variables that are either fully part of
the scop (loop induction variable) or induction variables that are scop-
invariant (parameter). A loop that is only partially part of the
scop causes troubles, as there is no good way to handle the induction
variable in the independent blocks pass.
Contributed-by: Star Tan <tanmx_star@yeah.net>
llvm-svn: 183800
Sebastian Pop [Tue, 11 Jun 2013 22:20:35 +0000 (22:20 +0000)]
scop detection: remove an iteration over all uses
llvm-svn: 183799
Sebastian Pop [Tue, 11 Jun 2013 22:20:32 +0000 (22:20 +0000)]
scop detection: run isValidLoop as early as possible
to discard regions with invalid loops before going through the contents of the
basic blocks
llvm-svn: 183798
Sebastian Pop [Tue, 11 Jun 2013 22:20:27 +0000 (22:20 +0000)]
scop detection: run isValidCFG as early as possible
to discard regions with invalid CFG before going through the contents of the
basic blocks
llvm-svn: 183797
Rafael Espindola [Tue, 11 Jun 2013 22:17:04 +0000 (22:17 +0000)]
Include Path.h instead of PathV2.h.
I am about to move PathV2.h to Path.h.
llvm-svn: 183796
Rafael Espindola [Tue, 11 Jun 2013 22:15:02 +0000 (22:15 +0000)]
Include Path.h instead of PathV2.h.
I am about to move PathV2.h to Path.h.
llvm-svn: 183795
JF Bastien [Tue, 11 Jun 2013 22:13:46 +0000 (22:13 +0000)]
ARM FastISel fix sext/zext fold
Sign- and zero-extension folding was slightly incorrect because it wasn't checking that the shift on extensions was zero. Further, I recently added AND rd, rn, #255 as a form of 8-bit zero extension, and failed to add the folding code for it.
This patch fixes both issues.
This patch fixes both, and the test should remain the same:
test/CodeGen/ARM/fast-isel-fold.ll
llvm-svn: 183794
Enrico Granata [Tue, 11 Jun 2013 22:06:06 +0000 (22:06 +0000)]
<rdar://problem/
13646047>
Providing a Python helper SBData.CreateDataFromInt() to make an SBData out of a single integer number
It tries to use the current target, if any, for endianness and pointer size, and it picks a reasonable size on your behalf - if there is no way it can infer anything reasonable it essentially picks a 64-bit Mac as the reference model
llvm-svn: 183793
Greg Clayton [Tue, 11 Jun 2013 21:56:55 +0000 (21:56 +0000)]
Use llvm::APFloat for formatting if a target is available. Each target when debugging has a "ASTContext" that helps us to use the correct floating point semantics. Now that APFloat supports toString we now use that. If we don't have a target, we still fall back on the old display methodology, but the important formatting should always have a target available and thus use the compiler floating point code.
Modified the test programs to use floating point constants that always will display correctly. We had some numbers that were being rounded, and now that we are using clang, we no longer round them and we get more correct results.
llvm-svn: 183792
Eli Friedman [Tue, 11 Jun 2013 21:48:11 +0000 (21:48 +0000)]
Correctly handle designated initializers which modify an array initialized
with a string. This case is sort of tricky because we can't modify the
StringLiteral used to represent such initializers.
We are forced to decompose the string into individual characters.
Fixes <rdar://problem/
10465114>.
llvm-svn: 183791
Tobias Grosser [Tue, 11 Jun 2013 21:45:01 +0000 (21:45 +0000)]
Make host ARM CPU feature detection independent of the vendor
For ARM on linux we use /proc/cpuinfo to detect the host CPU's features.
Linux derives these values without ever looking at the vendor of the
specific CPU implementation. Hence, it adds little value, if we parse
the output of /proc/cpuinfo only for certain vendors.
This patch enables us to derive the correct feature flags e.g. for Qualcomm
CPUs.
llvm-svn: 183790
Rui Ueyama [Tue, 11 Jun 2013 21:39:58 +0000 (21:39 +0000)]
[PECOFF][Writer] Structure of pe32_header was changed.
Change for http://llvm-reviews.chandlerc.com/D952
Reviewers: Bigcheese
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D953
llvm-svn: 183789
Rui Ueyama [Tue, 11 Jun 2013 21:39:48 +0000 (21:39 +0000)]
[PECOFF] Remove COFF header from PE header for simplicity.
COFF header is always present both in executable and in object file. PE header
is present only in executable. So the natural way to handle PE/COFF file is
treating COFF is mandatory header and PE is optional. Current data structre
does not allow it, because PE header includes COFF header. Removing COFF
header will simplify the code to handle PE/COFF files.
Reviewers: Bigcheese
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D952
llvm-svn: 183788
Richard Smith [Tue, 11 Jun 2013 20:38:45 +0000 (20:38 +0000)]
Add a testcase for PR7434, which is a bug we no longer appear to have.
llvm-svn: 183787
Rafael Espindola [Tue, 11 Jun 2013 20:31:32 +0000 (20:31 +0000)]
Include PathV1.h in a file that uses it.
llvm-svn: 183786
Rafael Espindola [Tue, 11 Jun 2013 20:24:32 +0000 (20:24 +0000)]
More build fixes.
llvm-svn: 183785
Rafael Espindola [Tue, 11 Jun 2013 20:12:07 +0000 (20:12 +0000)]
Fix build after clang change r183781.
llvm-svn: 183784
Rafael Espindola [Tue, 11 Jun 2013 20:06:05 +0000 (20:06 +0000)]
Try to fix the windows build.
llvm-svn: 183783
Rafael Espindola [Tue, 11 Jun 2013 20:00:56 +0000 (20:00 +0000)]
Include PathV1.h in files that use it.
This is preparation for replacing Path.h with PathV2.h.
llvm-svn: 183782
Rafael Espindola [Tue, 11 Jun 2013 19:59:07 +0000 (19:59 +0000)]
Include PathV1.h in files that use it.
This is preparation for replacing Path.h with PathV2.h.
llvm-svn: 183781
Rafael Espindola [Tue, 11 Jun 2013 19:32:57 +0000 (19:32 +0000)]
Remove Path::getDirname.
llvm-svn: 183780
Rafael Espindola [Tue, 11 Jun 2013 19:29:48 +0000 (19:29 +0000)]
Remove Path::getBasename.
llvm-svn: 183779
Rafael Espindola [Tue, 11 Jun 2013 19:25:17 +0000 (19:25 +0000)]
Remove Path::getLast.
llvm-svn: 183778
Rafael Espindola [Tue, 11 Jun 2013 19:18:05 +0000 (19:18 +0000)]
Remove GetDLLSuffix.
llvm-svn: 183777
Richard Smith [Tue, 11 Jun 2013 19:14:25 +0000 (19:14 +0000)]
Revert r183721. It caused cleanups to be delayed too long in some cases.
Testcase to follow.
llvm-svn: 183776
Rafael Espindola [Tue, 11 Jun 2013 19:13:52 +0000 (19:13 +0000)]
Remove GetRootDirectory.
llvm-svn: 183775
Enrico Granata [Tue, 11 Jun 2013 19:13:50 +0000 (19:13 +0000)]
Making our Python decrefs NULL-safe
llvm-svn: 183774
Rafael Espindola [Tue, 11 Jun 2013 19:08:15 +0000 (19:08 +0000)]
Remove GetUserHomeDirectory.
llvm-svn: 183773
Enrico Granata [Tue, 11 Jun 2013 19:04:32 +0000 (19:04 +0000)]
<rdar://problem/
13759177>
Allowing LLDB to resolve names of Python functions when they are located in classes
This allows things like *bound* classmethods to be used for formatters, commands, ...
llvm-svn: 183772
Rafael Espindola [Tue, 11 Jun 2013 19:04:13 +0000 (19:04 +0000)]
Don't define LTDL_SHLIBPATH_VAR.
llvm-svn: 183771
Rafael Espindola [Tue, 11 Jun 2013 18:58:47 +0000 (18:58 +0000)]
Remove GetSystemLibraryPaths.
llvm-svn: 183770
Rafael Espindola [Tue, 11 Jun 2013 18:52:11 +0000 (18:52 +0000)]
Don't define LLVM_LIBDIR, it is not used anymore.
llvm-svn: 183769
Samuel Benzaquen [Tue, 11 Jun 2013 18:51:07 +0000 (18:51 +0000)]
Reduce the number of symbols on the object file.
Summary:
Some compilers where failing with this file because the number of symbols was above 2**15.
- Replace std::list<> and std::vector<> with plain arrays.
- Change VariadicMatcherCreateCallback to be a function template, and a
single class that wraps the instantiations.
- Remove some more unnecessary template arguments and function calls.
Reviewers: klimek
CC: cfe-commits, revane
Differential Revision: http://llvm-reviews.chandlerc.com/D948
llvm-svn: 183768
Akira Hatanaka [Tue, 11 Jun 2013 18:48:16 +0000 (18:48 +0000)]
[mips] Use function TargetInstrInfo::getRegClass.
No functionality changes.
llvm-svn: 183767
Enrico Granata [Tue, 11 Jun 2013 18:47:55 +0000 (18:47 +0000)]
<rdar://problem/
13779789>
Allow memory read -t to take persistent types (those defined with expression struct $....)
llvm-svn: 183766
Rafael Espindola [Tue, 11 Jun 2013 18:45:35 +0000 (18:45 +0000)]
Remove Path::GetBitcodeLibraryPaths.
llvm-svn: 183765
Rafael Espindola [Tue, 11 Jun 2013 18:41:07 +0000 (18:41 +0000)]
Remove unused FindLibrary function.
llvm-svn: 183764
Rafael Espindola [Tue, 11 Jun 2013 18:18:02 +0000 (18:18 +0000)]
Remove sys::identifyFileType.
llvm-svn: 183763
Rafael Espindola [Tue, 11 Jun 2013 18:12:28 +0000 (18:12 +0000)]
Convert another use of sys::identifyFileType.
No functionality change.
llvm-svn: 183762
Michael Liao [Tue, 11 Jun 2013 18:09:21 +0000 (18:09 +0000)]
Fix documentation on the path to Bitcode reader/writer
llvm-svn: 183761
Argyrios Kyrtzidis [Tue, 11 Jun 2013 18:05:42 +0000 (18:05 +0000)]
[libclang/python] Add a few "cursor kinds" that were missing in the python binding for libclang.
Patch by Mathieu Baudet!
llvm-svn: 183760
Rafael Espindola [Tue, 11 Jun 2013 18:05:26 +0000 (18:05 +0000)]
Convert another use of sys::identifyFileType.
No functionality change.
llvm-svn: 183759
Rafael Espindola [Tue, 11 Jun 2013 18:01:14 +0000 (18:01 +0000)]
Convert another use of sys::identifyFileType.
No functionality change.
llvm-svn: 183758
Eli Friedman [Tue, 11 Jun 2013 17:58:38 +0000 (17:58 +0000)]
Make ASTContext::Allocate use size_t for the size argument.
llvm-svn: 183757
Rafael Espindola [Tue, 11 Jun 2013 17:48:06 +0000 (17:48 +0000)]
Change how globalopt handles aliases in llvm.used.
Instead of a custom implementation of replaceAllUsesWith, we just call
replaceAllUsesWith and recreate llvm.used and llvm.compiler-used.
This change is particularity interesting because it makes llvm see
through what clang is doing with static used functions in extern "C"
contexts. With this change, running clang -O2 in
extern "C" {
__attribute__((used)) static void foo() {}
}
produces
@llvm.used = appending global [1 x i8*] [i8* bitcast (void ()* @foo to
i8*)], section "llvm.metadata"
define internal void @foo() #0 {
entry:
ret void
}
llvm-svn: 183756
Greg Clayton [Tue, 11 Jun 2013 17:32:06 +0000 (17:32 +0000)]
Remove eFormatHalfFloat as it isn't needed. eFormatFloat should be used and the byte size will tell us how to display it.
llvm-svn: 183755
Rafael Espindola [Tue, 11 Jun 2013 17:28:56 +0000 (17:28 +0000)]
Convert another use of sys::identifyFileType.
No functionality change.
llvm-svn: 183754
Rafael Espindola [Tue, 11 Jun 2013 17:25:45 +0000 (17:25 +0000)]
Port r183666 to identify_magic.
It will be tested in the next commit which moves another user to identify_magic.
Original message:
Fix an out of bounds array access.
We were looking at Magic[5] without checking Length. Since this path would not
return unless Length >= 18 anyway, just move the >= 18 check up.
llvm-svn: 183753
Rafael Espindola [Tue, 11 Jun 2013 17:22:12 +0000 (17:22 +0000)]
Fix variable name.
llvm-svn: 183752