Commit Graph

62284 Commits

Author SHA1 Message Date
Chris Lattner f840ed7ed4 Fix lli to print an error and exit when EE returns null but no string. Patch
by Eric Rannaud!

llvm-svn: 74930
2009-07-07 18:31:09 +00:00
Chris Lattner 72a743fc47 "BinaryObject.h was implicitly converting between uint{16,32,64}_t to
uint8_t (via 'foo & 255'), i replaced this with an explicit (uint8_t)
cast which is equivalent, faster and more correct (silences
type-related warnings). Also, following coding standards I replaced
post-increment with pre-increment."

Patch by Ryan Flynn!

llvm-svn: 74929
2009-07-07 18:28:00 +00:00
Bill Wendling e446053099 Remove unused parameter.
llvm-svn: 74928
2009-07-07 18:21:19 +00:00
Chris Lattner 3612256e2e Eliminate the static constructors and locks from DynamicLibrary.cpp.
This fixes PR4512 and eliminating static ctors is always good.  Losing
thread safety is unfortunate, but the code is just incredibly poorly
designed.

If someone is interested, the "right" solution is to split
DynamicLibrary.cpp into two separate pieces: a stateless piece in
libsystem, and a simple support file in libsupport that has the
"state" (e.g.  AddSymbol) in managed static objects.

Doing this would both fix memory leaks we already have, as well as make
the code thread safe again.  it would also make sense to move all the
unix specific code in System/DynamicLibrary.cpp into 
System/Unix/DynamicLibrary.inc.

llvm-svn: 74927
2009-07-07 18:17:07 +00:00
Chris Lattner 5ceb2cb005 remove dead code, noone creates instances of "DynamicLibrary", so the ctor and dtor are dead.
llvm-svn: 74926
2009-07-07 18:01:58 +00:00
Evan Cheng 0878f15fa1 Revert 74898. It broke several tests.
llvm-svn: 74925
2009-07-07 17:50:43 +00:00
Chris Lattner 4efb280fb0 we don't use libtool anymore, update comments.
llvm-svn: 74924
2009-07-07 17:50:11 +00:00
Torok Edwin 973c214ce0 Fix braces.
llvm-svn: 74923
2009-07-07 17:39:53 +00:00
Torok Edwin 6c2d233e7a Introduce new error handling API.
This will replace exit()/abort() style error handling with an API
that allows clients to register custom error handling hooks.
The default is to call exit(1) when no error handler is provided.

llvm-svn: 74922
2009-07-07 17:32:34 +00:00
Owen Anderson 9e2af02143 Re-LLVMContext-ize DebugInfo, now with less breakage.
llvm-svn: 74920
2009-07-07 17:12:53 +00:00
Chris Lattner de50a0c251 Convert the CharInfo table to be statically initialized, instead of dynamically initialized. Patch by Ryan Flynn!
llvm-svn: 74919
2009-07-07 17:09:54 +00:00
Dan Gohman af75234955 Change all SCEV* to SCEV *.
llvm-svn: 74918
2009-07-07 17:06:11 +00:00
Douglas Gregor 2074977695 Tighten up the conditions under which we build an implicit function
declaration for a builtin.

llvm-svn: 74917
2009-07-07 17:00:05 +00:00
Owen Anderson 5723bd43d3 This parameter should default to true, not false.
llvm-svn: 74915
2009-07-07 16:56:05 +00:00
Mikhail Glushenkov ff4718b0a1 Regenerate.
llvm-svn: 74914
2009-07-07 16:44:20 +00:00
Mikhail Glushenkov 2512c2a1f6 Documentation update.
llvm-svn: 74913
2009-07-07 16:43:49 +00:00
Mikhail Glushenkov 244821fbe5 Show how to modify built-in options.
Sanjiv complained about the need to maintain local changes to
lib/CompilerDriver.

llvm-svn: 74912
2009-07-07 16:39:33 +00:00
Douglas Gregor 27821cee82 Make ASTContext explicitly keep track of the declaration for the C
FILE type, rather than using name lookup to find FILE within the
translation unit. Within precompiled headers, FILE is treated as yet
another "special type" (like __builtin_va_list).

This change should provide a performance improvement (not verified),
since the lookup into the translation unit declaration 
forces the (otherwise unneeded) construction of a large hash table.
More importantly, with precompiled headers, the construction
of that table requires deserializing most of the top-level
declarations from the precompiled header, which are then unused.

Fixes PR 4509.

llvm-svn: 74911
2009-07-07 16:35:42 +00:00
Owen Anderson 4f3675ca73 Revert part of r74873 that broke Clang's debug info generation.
llvm-svn: 74910
2009-07-07 16:31:25 +00:00
Fariborz Jahanian 003a880c41 A few change per Doug's feedback.
- Fariborz

llvm-svn: 74909
2009-07-07 16:24:08 +00:00
Mikhail Glushenkov 54751921ca Regenerate.
llvm-svn: 74908
2009-07-07 16:09:48 +00:00
Mikhail Glushenkov f4cc0cddbc Documentation update.
llvm-svn: 74907
2009-07-07 16:09:29 +00:00
Mikhail Glushenkov 5d458e0f06 s/llvmc2/llvmc/
llvm-svn: 74906
2009-07-07 16:09:05 +00:00
Mikhail Glushenkov b0df5047e5 Add an 'init' option property.
Makes possible to provide default values for options defined in plugins (same as
cl::init).

llvm-svn: 74905
2009-07-07 16:08:41 +00:00
Mikhail Glushenkov 182512b403 Refactoring.
Make isList(), isSwitch() and isParameter() member functions of
OptionDescription.

llvm-svn: 74904
2009-07-07 16:08:11 +00:00
Mikhail Glushenkov 2de4161b23 Comment fix.
llvm-svn: 74903
2009-07-07 16:07:36 +00:00
Sanjiv Gupta 031bbef528 if the terminator is a branch depending upon the side effects of a
previous cmp; a copy can not be inserted here if the copy insn also has
 side effects. We don't have access to the attributes of copy insn here;
 so just play safe by finding a safe locations for branch terminators.

llvm-svn: 74898
2009-07-07 08:04:51 +00:00
Zhongxing Xu 6999b90146 Fix comment.
llvm-svn: 74896
2009-07-07 07:14:55 +00:00
Evan Cheng d0f6324cdc Add Thumb2 pkhbt / pkhtb.
llvm-svn: 74895
2009-07-07 05:35:52 +00:00
Chris Lattner 5c34938aa4 fix an out-of-date comment.
llvm-svn: 74894
2009-07-07 05:05:42 +00:00
Sanjiv Gupta 30f95ec27d pic16 preproc defs.
llvm-svn: 74893
2009-07-07 04:42:23 +00:00
Zhongxing Xu cf67e61faa fix comment.
llvm-svn: 74890
2009-07-07 01:36:53 +00:00
Evan Cheng b24e51e2d9 Add some more Thumb2 multiplication instructions.
llvm-svn: 74889
2009-07-07 01:17:28 +00:00
Evan Cheng 7c9434399d 80 col violation.
llvm-svn: 74888
2009-07-07 01:16:41 +00:00
Argyrios Kyrtzidis 3f50f7e853 Refactor DeclLocResolver/StmtLocResolver into a more functional style by removing the search state
and by having their Visit* methods return the ASTLocation directly.

llvm-svn: 74887
2009-07-07 00:53:31 +00:00
Dale Johannesen 56a53d02e1 Don't accept globals as matching 'i' constraint
in PIC modes (in accordance with existing comment).
gcc.apple/asm-block-25.c

llvm-svn: 74886
2009-07-07 00:18:49 +00:00
Douglas Gregor 0086a5a3bb Introduce the notion of "Relocatable" precompiled headers, which are built
with a particular system root directory and can be used with a different
system root directory when the headers it depends on have been installed.
Relocatable precompiled headers rewrite the file names of the headers used
when generating the PCH file into the corresponding file names of the 
headers available when using the PCH file.

Addresses <rdar://problem/7001604>.

llvm-svn: 74885
2009-07-07 00:12:59 +00:00
Ted Kremenek 97213bac53 NewCastRegion: Handle casts *from* pointers to incomplete structs to other types.
llvm-svn: 74884
2009-07-06 23:47:19 +00:00
Devang Patel 446bff93f5 Add isMetadata() to check metadata operand.
llvm-svn: 74883
2009-07-06 23:46:02 +00:00
Devang Patel 5832e7fd23 Add new ValueType for metadata.
llvm-svn: 74882
2009-07-06 23:44:32 +00:00
Devang Patel 78b7c1bfe7 !"i" is a valid MDString.
llvm-svn: 74881
2009-07-06 23:40:48 +00:00
Devang Patel 8e8028eac3 Avoid directly relying on llvm.dbg.compile_unit and llvm.dbg.global_variables.
PIC16 developers, please verify. Thanks.

llvm-svn: 74880
2009-07-06 23:28:36 +00:00
Devang Patel c4744b9e22 Add FIXMEs.
llvm-svn: 74879
2009-07-06 23:11:08 +00:00
Owen Anderson 38264b1554 "LLVMContext* " --> "LLVMContext *"
llvm-svn: 74878
2009-07-06 23:00:19 +00:00
Ted Kremenek 0ee2913215 Fix 80 col violation.
llvm-svn: 74877
2009-07-06 22:59:23 +00:00
Ted Kremenek 309d3c6db0 Restructure NewCastRegion to use a switch statement that dispatches off the
region type. This better shows the logic of the method and allows the compiler
to check if we didn't handle a specific region kind.

llvm-svn: 74876
2009-07-06 22:56:37 +00:00
Ted Kremenek f45778f425 Fix 80 col violation.
llvm-svn: 74875
2009-07-06 22:40:36 +00:00
Ted Kremenek bb5a62d46e NewCastRegion: Handle casts to any Objective-C pointer, not just qualified ids.
llvm-svn: 74874
2009-07-06 22:39:40 +00:00
Owen Anderson f1f1743b2e Finish LLVMContext-ing lib/Analysis. This required pushing LLVMContext's through the ValueTracking API.
llvm-svn: 74873
2009-07-06 22:37:39 +00:00
Ted Kremenek 83b5ccbecf Implement FIXME.
llvm-svn: 74872
2009-07-06 22:34:50 +00:00