Dan Gohman
43aa8f03c1
Add support for remapping metadata kind IDs when reading in a
...
bitcode file, so that two bitcode files where the same metadata kind
name happens to have been assigned a different ID can still be
linked together.
Eliminate the restriction that metadata kind IDs can't be 0.
Change MD_dbg from 1 to 0, because we can now, and because it's
less mysterious that way.
llvm-svn: 108939
2010-07-20 21:42:28 +00:00
Matt Fleming
c3eb5e3d4b
Include some tests for the recently committed ELF section directive
...
handlers.
llvm-svn: 108938
2010-07-20 21:37:30 +00:00
Chris Lattner
94027202e0
don't demand names to be on IR.
...
llvm-svn: 108937
2010-07-20 21:34:36 +00:00
Chris Lattner
2be2074f75
temporarily disable this to fix the build bot.
...
llvm-svn: 108936
2010-07-20 21:32:10 +00:00
Dale Johannesen
6e5ec6263e
Fix test for switch statements and increase
...
threshold a bit per experimentation.
llvm-svn: 108935
2010-07-20 21:29:12 +00:00
Chris Lattner
14caa59b14
there is now no reason to link in TARGETS_TO_BUILD since we list
...
arm explicitly. X86 and ARM are the only two targets that support
disassembly, so our explicit list is enough. These other targets
weren't getting pulled in anyway though, since there were no
references to their symbols.
llvm-svn: 108934
2010-07-20 21:26:27 +00:00
Chris Lattner
75217e8cb7
fix edis to only try to link in the x86 parts if the x86 backend is
...
enabled. Add direct ARM support.
llvm-svn: 108933
2010-07-20 21:23:57 +00:00
Owen Anderson
4154061b92
Move more functionality from Pass.cpp to PassRegistry.cpp. This global will go away eventually, but for now we still need it around.
...
llvm-svn: 108932
2010-07-20 21:22:24 +00:00
Douglas Gregor
5d69a3d518
Fix edis makefile
...
llvm-svn: 108931
2010-07-20 21:21:27 +00:00
Sebastian Redl
b293a45d28
More work on getting PCHReader to handle multiple files. Promote SLocOffsets to per-file data. WIP
...
llvm-svn: 108930
2010-07-20 21:20:32 +00:00
Chris Lattner
cbe9856fce
prune #includes a little.
...
llvm-svn: 108929
2010-07-20 21:17:29 +00:00
Matt Fleming
a8f6c1cc26
Add some more handlers for ELF section directives.
...
llvm-svn: 108928
2010-07-20 21:12:46 +00:00
Chris Lattner
f2f3870189
Follow the implementation approach suggested by PR6687,
...
which generates more efficient and more obviously conformant
code. We now test for overflow of the multiply then force
the result to -1 if so. On X86, this generates nice code
like this:
__Z4testl: ## @_Z4testl
## BB#0: ## %entry
subl $12, %esp
movl $4, %eax
mull 16(%esp)
testl %edx, %edx
movl $-1, %ecx
cmovel %eax, %ecx
movl %ecx, (%esp)
call __Znam
addl $12, %esp
ret
llvm-svn: 108927
2010-07-20 21:07:09 +00:00
Eric Christopher
bb610d9053
Formatting.
...
llvm-svn: 108926
2010-07-20 21:05:58 +00:00
Chris Lattner
9289f93153
fix DISABLE_EDIS
...
llvm-svn: 108925
2010-07-20 20:55:57 +00:00
Matt Fleming
0535f00eb6
Add the rest of the SHT_* values as defined in the System V ABI
...
ELF specification.
llvm-svn: 108924
2010-07-20 20:52:18 +00:00
Bob Wilson
ebcaddee44
Add support for a new Apple-style build target, EmbeddedSim, that builds
...
llvmCore for the iOS Simulator.
llvm-svn: 108922
2010-07-20 20:44:02 +00:00
Chris Lattner
03b7884b88
this logic is handled by tools/makefile.
...
llvm-svn: 108919
2010-07-20 20:33:59 +00:00
Eric Christopher
3f696ff489
Testcase for llvm-gcc commit r108910.
...
llvm-svn: 108918
2010-07-20 20:32:47 +00:00
Fariborz Jahanian
217af240b5
Adopt objc_assign_threadlocal() for __thread variables of GC types.
...
Implements radar 8203301.
llvm-svn: 108917
2010-07-20 20:30:03 +00:00
Devang Patel
6c01820900
Print template argument names for template class.
...
llvm-svn: 108916
2010-07-20 20:24:18 +00:00
Chris Lattner
26008e07de
implement rdar://5739832 - operator new should check for overflow in multiply,
...
causing clang to compile this code into something that correctly throws a
length error, fixing a potential integer overflow security attack:
void *test(long N) {
return new int[N];
}
int main() {
test(1L << 62);
}
We do this even when exceptions are disabled, because it is better for the
code to abort than for the attack to succeed.
This is heavily based on a patch that Fariborz wrote.
llvm-svn: 108915
2010-07-20 20:19:24 +00:00
Dan Gohman
47a0f0d56f
Remove setDbgMetadata and getDbgMetadata; their users have been
...
replaced with setDebugLoc and getDebugLoc.
llvm-svn: 108914
2010-07-20 20:18:21 +00:00
Douglas Gregor
af82e3510b
Introduce a new lexer function to compute the "preamble" of a file,
...
which is the part of the file that contains all of the initial
comments, includes, and preprocessor directives that occur before any
of the actual code. Added a new -print-preamble cc1 action that is
only used for testing.
llvm-svn: 108913
2010-07-20 20:18:03 +00:00
Owen Anderson
14d74d649a
Let's get those buildbots green: #include is needed in the header, not just the implementation.
...
llvm-svn: 108912
2010-07-20 20:16:11 +00:00
Dan Gohman
481e40c681
Use getDebugLoc and setDebugLoc instead of getDbgMetadata and setDbgMetadata,
...
avoiding MDNode overhead.
llvm-svn: 108911
2010-07-20 20:13:52 +00:00
Dan Gohman
d2c7e52d05
Use getDebugLoc and setDebugLoc instead of getDbgMetadata and setDbgMetadata,
...
avoiding MDNode overhead.
llvm-svn: 108909
2010-07-20 20:09:07 +00:00
Chris Lattner
073660336c
apparently also missing an include.
...
llvm-svn: 108908
2010-07-20 20:06:19 +00:00
Ted Kremenek
4407ea4948
Hookup checking for invalid length modifiers in scanf format strings.
...
llvm-svn: 108907
2010-07-20 20:04:47 +00:00
Ted Kremenek
ea28f83a5f
Move 'hasValidLengthModifier' from PrintfFormatSpecifier to FormatSpecifier.
...
llvm-svn: 108906
2010-07-20 20:04:42 +00:00
Ted Kremenek
36521956f7
Cleanup whitespace in switch statement. No functionality change.
...
llvm-svn: 108905
2010-07-20 20:04:36 +00:00
Ted Kremenek
bb0ffd7ade
Refactor ScanfConversionSpecifier to subclass ConversionSpecifier.
...
llvm-svn: 108904
2010-07-20 20:04:32 +00:00
Ted Kremenek
f03e6d85a1
Add 'ConversionSpecifier' root class in 'analyze_format_string' namespace and
...
derived 'PrintfConversionSpecifier' from this class. We will do the same for
'ScanfConversionSpecifier'.
llvm-svn: 108903
2010-07-20 20:04:27 +00:00
Ted Kremenek
fe1316882c
Tidy up analyze_printf::ConversionSpecifier::Kind declaration, prepping it to be merged
...
with analyze_scanf::ConversionSpecifier::Kind.
llvm-svn: 108902
2010-07-20 20:04:20 +00:00
Ted Kremenek
348d1499c1
Rename 'UnicodeStrArg' to 'SArg'.
...
llvm-svn: 108901
2010-07-20 20:04:15 +00:00
Ted Kremenek
516ef222ba
Rename 'ConsumedSoFarArg' -> 'nArg' and 'OutIntPtrArg' to 'nArg' (scanf and printf checking).
...
llvm-svn: 108900
2010-07-20 20:04:10 +00:00
Ted Kremenek
1ce32be36a
Rename 'VoidPtrArg' to 'pArg' in printf/scanf checking.
...
llvm-svn: 108899
2010-07-20 20:04:04 +00:00
Ted Kremenek
563e3edbc2
Rename 'CStrArg' to 'sArg' for printf checking to match with the analagous enum for scanf checking.
...
llvm-svn: 108898
2010-07-20 20:03:58 +00:00
Ted Kremenek
ab0fe8a48d
Rename analyze_printf::ConversionSpecifier::IntAsCharArg to 'cArg' to match
...
analagous enum in analyze_scanf. This is prep for refactoring the logic for handling
ConversionSpecifiers for both scanf and printf.
llvm-svn: 108897
2010-07-20 20:03:49 +00:00
Ted Kremenek
b65a9d5a1a
Rename diagnostic so that it can be reused with scanf checking. No functionality change.
...
llvm-svn: 108896
2010-07-20 20:03:43 +00:00
Chris Lattner
4e8e93f142
this is in System
...
llvm-svn: 108895
2010-07-20 19:54:01 +00:00
Chris Lattner
394f1c2a27
remove option from tablegen for building static header.
...
llvm-svn: 108893
2010-07-20 19:45:21 +00:00
Bruno Cardoso Lopes
3b505848fd
Add new AVX instruction vinsertf128
...
llvm-svn: 108892
2010-07-20 19:44:51 +00:00
Chris Lattner
6faea9668f
turn this into a normal header.
...
llvm-svn: 108891
2010-07-20 19:43:19 +00:00
Chris Lattner
55cdb62dd0
hopefully heal the linux builders
...
llvm-svn: 108890
2010-07-20 19:40:51 +00:00
Gabor Greif
dd8ba3c275
tidy up
...
llvm-svn: 108889
2010-07-20 19:35:55 +00:00
Owen Anderson
660466ed42
I just fail with SVN today.
...
llvm-svn: 108888
2010-07-20 19:23:55 +00:00
Chris Lattner
91773ea9b2
there is no reason to dynamically generate a static header.
...
llvm-svn: 108887
2010-07-20 18:59:58 +00:00
Chris Lattner
7e52a45f8a
drop edinfo.inc into the objdir for src!=objdir builds.
...
llvm-svn: 108886
2010-07-20 18:53:27 +00:00
Owen Anderson
2af72f623d
Oops.
...
llvm-svn: 108885
2010-07-20 18:53:25 +00:00