Commit Graph

62101 Commits

Author SHA1 Message Date
Ted Kremenek 873db25879 Minor code cleanup: pull variables into scope of 'if' statement, limiting their
actual lifetime to their logical lifetime.

llvm-svn: 74665
2009-07-01 23:30:34 +00:00
Douglas Gregor e4d00dd7f6 Fix PR 4489, a PCH crash during de-serialization.
llvm-svn: 74664
2009-07-01 23:29:14 +00:00
Owen Anderson 54648d867f Fix the LTO header for LLVMContext changes.
llvm-svn: 74663
2009-07-01 23:28:55 +00:00
Ted Kremenek a8a295f2d9 Temporarily disable RegionStore for stack-addr-ps.c, as a new test case reveals
a case where RegionStore doesn't create symbolic values for the fields of
structs that are passed-by-value.

llvm-svn: 74662
2009-07-01 23:24:11 +00:00
Dan Gohman cf092389a9 Request LCSSA after LoopSimplify. This fixes a problem in which the
PassManager was scheduling LCSSA before LoopSimplify, which does not
preserve LCSSA.

llvm-svn: 74661
2009-07-01 23:21:38 +00:00
Ted Kremenek 55e07efeed Add a FIXME to RegionStore, do some minor code cleanup, and get RegionStore to
pass misc-ps.m. Currently RegionStore/BasicStore don't do any special reasoning
about clang-style vectors, so we should return UnknownVal (in all cases) when
accessing their values via an array.

llvm-svn: 74660
2009-07-01 23:19:52 +00:00
Devang Patel 53d24bc7d6 Refactor. No functionality change.
llvm-svn: 74659
2009-07-01 23:19:01 +00:00
Bob Wilson deb35afd23 Add a new addressing mode for NEON load/store instructions.
llvm-svn: 74658
2009-07-01 23:16:05 +00:00
Owen Anderson ecaeaa81b1 Update for changes in LLVM. Hopefully this is the last one for a while.
llvm-svn: 74657
2009-07-01 23:14:14 +00:00
Owen Anderson 2a15443aa8 Make the use of const with respect to LLVMContext sane. Hopefully this is the last time, for the
moment, that I will need to make far-reaching changes.

llvm-svn: 74655
2009-07-01 23:13:44 +00:00
Dan Gohman 83ff184206 Use find instead of operator[] to test whether an element is in a std::map.
This fixes a bug that caused -debug-pass=Details to abort.

llvm-svn: 74654
2009-07-01 23:12:33 +00:00
Bill Wendling 4534d2562b --- Reverse-merging (from foreign repository) r74648 into '.':
U    include/llvm/LLVMContext.h
U    lib/VMCore/LLVMContext.cpp
U    lib/AsmParser/LLParser.cpp
U    lib/AsmParser/LLParser.h

Temporarily reverting r74648. It was causing massive failures in release mode.

llvm-svn: 74653
2009-07-01 22:33:26 +00:00
Devang Patel b9fb595400 Keep DIDescriptor methods together.
No functionality change.

llvm-svn: 74652
2009-07-01 22:10:23 +00:00
Douglas Gregor ff6cbdf806 Keep track of more information within the template instantiation stack, e.g.,
by distinguishing between substitution that occurs for template
argument deduction vs. explicitly-specifiad template arguments. This
is used both to improve diagnostics and to make sure we only provide
SFINAE in those cases where SFINAE should apply.

In addition, deal with the sticky issue where SFINAE only considers
substitution of template arguments into the *type* of a function
template; we need to issue hard errors beyond this point, as
test/SemaTemplate/operator-template.cpp illustrates.

llvm-svn: 74651
2009-07-01 22:01:06 +00:00
Bob Wilson affb68bd08 Fix a comment typo.
llvm-svn: 74650
2009-07-01 21:59:43 +00:00
Owen Anderson 91b5e630a9 Fix typo.
llvm-svn: 74649
2009-07-01 21:58:14 +00:00
Owen Anderson 7373c6bbd6 Convert LLParser to use LLVMContext for creating constants.
llvm-svn: 74648
2009-07-01 21:57:44 +00:00
Andreas Bolka 394b4156cf Use AA to check objects before LDA.
llvm-svn: 74647
2009-07-01 21:45:23 +00:00
Dan Gohman 83348f80b6 Fix an instcombine abort on a scalar-to-vector bitcast. This fixes PR4487.
llvm-svn: 74646
2009-07-01 21:38:46 +00:00
Daniel Dunbar 4aef67c99d Tweak FindExecutable so that relative executable paths work as well.
llvm-svn: 74645
2009-07-01 21:36:28 +00:00
Devang Patel f206e4444b Add getMDNode() to access metadata node.
llvm-svn: 74644
2009-07-01 21:26:41 +00:00
Owen Anderson 03200753ee Hold the LLVMContext by reference instead of by pointer.
llvm-svn: 74642
2009-07-01 21:23:16 +00:00
Bob Wilson bbbf805049 Fix up a comment: besides the >80col lines, the operation for this
addressing mode is encoded in the second operand, not the third.

llvm-svn: 74641
2009-07-01 21:22:45 +00:00
Owen Anderson 1cf085d558 Hold the LLVMContext by reference rather than by pointer.
llvm-svn: 74640
2009-07-01 21:22:36 +00:00
Fariborz Jahanian 52337414b7 Updated CXXConstructorDecl AST node for ctor-initilaizer list.
No change in functionality.

llvm-svn: 74639
2009-07-01 21:05:43 +00:00
Devang Patel 5546b98d07 Fix metadata unittests
llvm-svn: 74638
2009-07-01 20:59:15 +00:00
Daniel Dunbar df4a58edd8 Fix thinko in r74506, test condition for floats was inverted.
- Refactored slightly to make control flow more obvious.

llvm-svn: 74637
2009-07-01 20:37:45 +00:00
Daniel Dunbar 82ef1abf43 Driver: Mark some Compilation members const.
llvm-svn: 74636
2009-07-01 20:30:52 +00:00
Daniel Dunbar 38bfda6ab5 Driver: Move Compilation::Execute to Driver::ExecuteCompilation.
- The Compilation is just a helper class, it shouldn't have that amount of
   logic in it.

 - No functionality change.

llvm-svn: 74634
2009-07-01 20:03:04 +00:00
Devang Patel 461f2bdcbe new test case
llvm-svn: 74633
2009-07-01 19:40:59 +00:00
Devang Patel de91b9e292 Do not print stranded metadata.
llvm-svn: 74632
2009-07-01 19:39:39 +00:00
Fariborz Jahanian c1fc3ec878 Patch to implement template types in ctor-initializer list.
Also has fix for bugzilla-4469.

llvm-svn: 74631
2009-07-01 19:21:19 +00:00
Devang Patel 39e64d452a Support stand alone metadata syntax.
!0 = constant metadata !{i32 21, i32 22}
@llvm.blah = constant metadata !{i32 1000, i16 200, metadata !0}

llvm-svn: 74630
2009-07-01 19:21:12 +00:00
Daniel Dunbar aa246cafaa Driver: Improve diagnostics for failed commands.
- Not all tools give good error messages, and sometimes the tool can fail w/o
   any error (for example, when signalled).

 - We suppress this message when the failing command is the compiler and it
   failed normally (exit code == 1), under the assumption that it gave a good
   diagnostic.

For example, for a linker failure we now get:
--
ddunbar@lordcrumb:tmp$ clang a.c b.c
ld: duplicate symbol _x in /var/folders/cl/clrOX6SaG+moCeRKEI4PtU+++TI/-Tmp-/cc-bXYITq.o and /var/folders/cl/clrOX6SaG+moCeRKEI4PtU+++TI/-Tmp-/cc-6uK4jD.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)
--

For a compiler crash we get:
--
ddunbar@lordcrumb:tmp$ clang t.i
Assertion failed: (CGT.getTargetData().getTypeAllocSizeInBits(STy) == RL.getSize()), function layoutStructFields, file CodeGenTypes.cpp, line 573.
0   clang-cc          0x0000000100f1f1f1 PrintStackTrace(void*) + 38
... stack trace and virtual stack trace follow ...
clang: error: compiler command failed due to signal 6 (use -v to see invocation)
--

But for a regular compilation failure we get the usual:
--
ddunbar@lordcrumb:tmp$ clang c.c
c.c:1:6: error: invalid token after top level declarator
int x
     ^
1 diagnostic generated.
--

 - No test case, not amenable to non-executable testing. :/

 - <rdar://problem/6945613>

llvm-svn: 74629
2009-07-01 19:14:39 +00:00
Devang Patel c41959534d Add machine operand for MDNodes. This will be used to communicate debug info.
llvm-svn: 74628
2009-07-01 19:08:07 +00:00
Daniel Dunbar 126b3a103e Driver: Add Source argument for Commands to hold the Action which caused a
Command to be generated, to support more advanced diagnostics.
 - No functionality change.

llvm-svn: 74627
2009-07-01 19:02:28 +00:00
Sebastian Redl df718773f7 Add header search path for Gentoo stable, x86_64 version.
llvm-svn: 74626
2009-07-01 18:59:43 +00:00
Devang Patel ea76e08645 llvm.dbg.declare is always used for local variable's debug info.
llvm-svn: 74625
2009-07-01 18:51:07 +00:00
Bill Wendling 512ff7353e Update comments to make it clear that the function alignment is the Log2 of the
bytes and not bytes.

llvm-svn: 74624
2009-07-01 18:50:55 +00:00
Jeffrey Yasskin 246676db7d Update configure and config.h.in from r74621.
llvm-svn: 74623
2009-07-01 18:30:10 +00:00
Owen Anderson 8bc174aef7 Fix unit tests for LLVMContext+Module.
llvm-svn: 74622
2009-07-01 18:14:20 +00:00
Jeffrey Yasskin 1a93330ffa Add a portable strerror*() wrapper, llvm::sys::StrError(). This includes the
Windows variant, strerror_s, but I couldn't test that.

I'll update configure and config.h.in in a subsequent patch.

llvm-svn: 74621
2009-07-01 18:11:20 +00:00
Misha Brukman 702e817733 Use correct format for LLVM header #includes.
llvm-svn: 74620
2009-07-01 17:51:56 +00:00
Owen Anderson e722976d54 I give up on trying to use reader/writer locks for recursive type refinement. Use a recursive mutex instead, which will (in theory) generate more contention, but is really
a much more natural fit for what's going on during recursive type refinement.

llvm-svn: 74618
2009-07-01 17:22:27 +00:00
Chris Lattner 503c370dea add the "get it and get involved" section.
llvm-svn: 74617
2009-07-01 17:16:20 +00:00
Owen Anderson d9dd77ff6c Update for LLVMContext+Module change.
llvm-svn: 74615
2009-07-01 17:00:06 +00:00
Owen Anderson 6773d388aa Add a pointer to the owning LLVMContext to Module. This requires threading LLVMContext through a lot
of the bitcode reader and ASM parser APIs, as well as supporting it in all of the tools.

Patches for Clang and LLVM-GCC to follow.

llvm-svn: 74614
2009-07-01 16:58:40 +00:00
Chris Lattner 1f50b61329 Fix codegen for references to available_externally symbols. This fixes
PR4482.

llvm-svn: 74613
2009-07-01 16:53:44 +00:00
Owen Anderson 02c4de3573 Try again at making this work on OpenBSD.
llvm-svn: 74612
2009-07-01 16:19:23 +00:00
Sanjiv Gupta 8ff5a6c262 Executables will be at InstallDir/bin directory. Std header files will be at InstallDir/include, libs will be at InstallDir/lib. Define hooks for these and use them in the options for various tools.
llvm-svn: 74611
2009-07-01 16:10:29 +00:00