Commit Graph

75604 Commits

Author SHA1 Message Date
Julien Lerouge 321098ebec Fix nondeterministic behavior.
llvm-svn: 93093
2010-01-10 01:07:22 +00:00
Chris Lattner c95a7a21b7 clean up this xform by using m_Trunc.
llvm-svn: 93092
2010-01-10 01:04:31 +00:00
Chris Lattner 883550afe8 inline and remove the rest of commonIntCastTransforms.
llvm-svn: 93091
2010-01-10 01:00:46 +00:00
Chris Lattner e0d2e342b3 try to make this more stable?
llvm-svn: 93090
2010-01-10 00:59:17 +00:00
Chris Lattner c3aca38468 Inline the expression type promotion/demotion stuff out of
commonIntCastTransforms into the callers, eliminating a switch,
and allowing the static predicate  methods to be moved down to
live next to the corresponding function.  No functionality 
change.

llvm-svn: 93089
2010-01-10 00:58:42 +00:00
Daniel Dunbar d281a7146a Fix PR5982, a refacto in checking for '=' in a -D argument.
llvm-svn: 93088
2010-01-10 00:46:21 +00:00
Daniel Dunbar 620327d66b Fix a FIXME.
llvm-svn: 93087
2010-01-10 00:46:10 +00:00
Daniel Dunbar 1c4788b66b Darwin/ld: Don't pass '-weak_reference_mismatches non-weak' when
-weak_reference_mismatches is not present, it is the default.

llvm-svn: 93086
2010-01-10 00:46:00 +00:00
Chris Lattner 062a721c46 add comment to test.
llvm-svn: 93085
2010-01-10 00:36:16 +00:00
Chris Lattner abcbb7c05b clarify comment.
llvm-svn: 93084
2010-01-10 00:35:27 +00:00
Chris Lattner 2ceb625f59 implement rdar://7520940: published framework headers should
import other headers within the same framework with the full
framework path, not with a relative include.

llvm-svn: 93083
2010-01-10 00:24:58 +00:00
Chris Lattner 51c49960a5 hopefully unbreak the ocaml bindings.
llvm-svn: 93082
2010-01-09 23:25:21 +00:00
Ted Kremenek c6aa800eb3 Fix overzealous assertion in GRExprEngine::VisitLValue(). A
CallExpr/ObjCMessageExpr can be visited in an "lvalue" context if it
returns a struct temporary.  Currently the analyzer doesn't reason
about struct temporary returned by function calls, but we shouldn't
crash here either.

llvm-svn: 93081
2010-01-09 22:58:54 +00:00
Chris Lattner 2bfa167d43 add 3 passes which have been added but aren't used afaik.
llvm-svn: 93080
2010-01-09 22:30:40 +00:00
Chris Lattner 25963c6113 "In order to ease automatic bindings generation, it would be helpful if boolean values were distinguishable from integers. The attached patch introduces "typedef int LLVMBool;", and uses LLVMBool instead of int throughout the C API, wherever a boolean value is called for."
Patch by James Y Knight!

llvm-svn: 93079
2010-01-09 22:27:07 +00:00
Chris Lattner e23003d1f1 implement -ftabstop=width, patch by Christian Adåker
llvm-svn: 93078
2010-01-09 21:54:33 +00:00
Chris Lattner b71980f888 revert 91891, a workaround for PR5514.
llvm-svn: 93077
2010-01-09 21:45:57 +00:00
Chris Lattner bb8976e36e implement codegen support for preinc as an lvalue, PR5514.
llvm-svn: 93076
2010-01-09 21:44:40 +00:00
Chris Lattner 116ce8f172 refactor pre/postinc logic into CGF and require the caller to pass in the
lvalue to poke, no functionality change.

llvm-svn: 93075
2010-01-09 21:40:03 +00:00
Chris Lattner 34c72dd683 revert r92749, which is just dead code.
llvm-svn: 93074
2010-01-09 21:14:47 +00:00
Chris Lattner 5ed4390474 make missing prototypes warn by default in c99 mode like GCC does,
rdar://7083878

llvm-svn: 93073
2010-01-09 20:43:38 +00:00
Chris Lattner f9895c48fd add a bunch of missing prototypes to tests
llvm-svn: 93072
2010-01-09 20:43:19 +00:00
Ted Kremenek 9aa01441c3 Fix broken diagnostic when returning the address of a stack-allocated array.
llvm-svn: 93071
2010-01-09 20:05:00 +00:00
Jeffrey Yasskin b867746a05 Clarify the requirements for a "tail call" to actually be optimized into a
jump.  People clearly weren't finding the extra requirements in
CodeGenerator.html.

llvm-svn: 93070
2010-01-09 19:44:16 +00:00
Chris Lattner 23ac41e8f0 fix bogus test
llvm-svn: 93069
2010-01-09 19:24:49 +00:00
Chris Lattner 6a7384357f fix bogus test
llvm-svn: 93068
2010-01-09 19:24:18 +00:00
Chris Lattner bbddd96406 fix PR5983, reject function bodies with no blocks per the grammar.
llvm-svn: 93067
2010-01-09 19:20:07 +00:00
Chris Lattner 0de4caa57b improve documentation for linkonce to be less confusing.
llvm-svn: 93066
2010-01-09 19:15:14 +00:00
Jeffrey Yasskin bb857e5d68 Fix http://llvm.org/PR5729: x86-64 tail calls were putting their targets into
R11, and then asserting that the target was in R9.  Since R9 isn't reserved for
the target anymore, and is used as an argument, this patch changes the
assertion.

llvm-svn: 93065
2010-01-09 18:56:43 +00:00
Benjamin Kramer 60fbd641ad Simplify with StringSwitch.
llvm-svn: 93064
2010-01-09 18:53:11 +00:00
Chris Lattner 09ac1b888c 2010 is here.
llvm-svn: 93063
2010-01-09 18:40:42 +00:00
Chris Lattner d2510d97cf 2010 is upon us.
llvm-svn: 93062
2010-01-09 18:40:31 +00:00
Benjamin Kramer dc2f006f4e Hopefully unbreak build with g++ >= 4.3.
llvm-svn: 93060
2010-01-09 18:20:57 +00:00
Dan Gohman bc694918cc Use WriteAsOperand instead of getName() to print loop header names,
so that unnamed blocks are handled.

llvm-svn: 93059
2010-01-09 18:17:45 +00:00
Benjamin Kramer 2d6fda3205 Use MacroBuilder for TargetDefines instead of std::vector.
llvm-svn: 93058
2010-01-09 17:55:51 +00:00
Benjamin Kramer 3f6323dea5 Move MacroBuilder into Frontend/Utils.h and clean it up a bit.
llvm-svn: 93057
2010-01-09 17:43:21 +00:00
Dan Gohman 62f05b262b Tighten up the vim LLVM IR syntax highlighting regex for labels, and add a
highlighting rule for identifiers.

llvm-svn: 93056
2010-01-09 17:22:48 +00:00
Dan Gohman d5ae136971 Set the vim auto-indent setting for open braces after case statements to
follow LLVM source convention.

Before:
  case X: {
            stuff;
          }

After:
  case X: {
    stuff;
  }

llvm-svn: 93055
2010-01-09 17:15:21 +00:00
David Chisnall 2c4a34aeef Fixed linking of modules containing aliases to constant bitcasts. Existing behaviour first tried to replace the aliases with the global that they aliased (rather than the bitcast), causing a crash on an assert because the types didn't match. When this was fixed, it then did the same thing creating the new alias (creating an alias with a different type to its aliasee).
Linking modules containing aliases to GEPs is still not quite right.  GEPs that are equivalent to bitcasts will be replaced by bitcasts, GEPs that are not will just break.  Aliases to GEPs that are not equivalent to bitcasts are horribly broken anyway (it might be worth adding an assert when creating the alias to prevent these being created; they just cause problems later).

llvm-svn: 93052
2010-01-09 16:27:31 +00:00
Benjamin Kramer f65e959035 Rework InitPreprocessor to use a MacroBuilder class instead of pushing around
std::vectors.

- MacroBuilder wraps a raw_ostream so it can easily write to any buffer
  supported by raw_ostream.
- MacroBuilder's method take Twines for easy string concatenation (this was done
  with sprintf and temporary buffers before).
- Targets still use std::vector as they don't have access to the builder.

llvm-svn: 93051
2010-01-09 16:17:37 +00:00
Kovarththanan Rajaratnam e8ed5be89f Switch UndefineBuiltinMacro() over to using StringRef
llvm-svn: 93049
2010-01-09 09:31:32 +00:00
Kovarththanan Rajaratnam 2f14619d89 Switch DefineBuiltinMacro() over to using StringRef
llvm-svn: 93048
2010-01-09 09:27:11 +00:00
Zhongxing Xu f1eeb78ffc When binding an rvalue to a reference, create a temporary object. Use
CXXObjectRegion to represent it. 

In Environment, lookup a literal expression before make up a value for it.

llvm-svn: 93047
2010-01-09 09:16:47 +00:00
Duncan Sands a230552b94 Suppress use of uninitialized variable warning.
llvm-svn: 93046
2010-01-09 08:30:33 +00:00
Chris Lattner ab7087ad66 only factor from expressions whose uses are empty and whose
base is the right expression type.  This fixes PR5981.

llvm-svn: 93045
2010-01-09 06:01:36 +00:00
Chris Lattner 002ba6b4d0 improve support for dragonfly, patch by Sascha Wildner!
llvm-svn: 93044
2010-01-09 05:41:14 +00:00
Dan Gohman 6bd3ef82ff Revert an earlier change to SIGN_EXTEND_INREG for vectors. The VTSDNode
really does need to be a vector type, because
TargetLowering::getOperationAction for SIGN_EXTEND_INREG uses that type,
and it needs to be able to distinguish between vectors and scalars.

Also, fix some more issues with legalization of vector casts.

llvm-svn: 93043
2010-01-09 02:13:55 +00:00
Chris Lattner 003143c582 clean up this code, add a fixme.
llvm-svn: 93042
2010-01-09 02:02:37 +00:00
Devang Patel 71ff547575 Delete NamedMDSymTable while destrucing Module.
Disable  copy ctor and operator= for NamedMDSymTable. Hide typedef that should be public.

llvm-svn: 93041
2010-01-09 01:44:59 +00:00
Dale Johannesen 237254dcab Add DEBUG_DECLARE. Not used yet.
llvm-svn: 93040
2010-01-09 01:24:25 +00:00