Commit Graph

92009 Commits

Author SHA1 Message Date
Shantonu Sen afeb03b41d Driver: implement driver automagic support for -lcc_kext
Rewrite linker arguments to use libclang_rt.cc_kext.a
instead of gcc-specific libcc_kext.a

Resolves Radar 7808495

llvm-svn: 114193
2010-09-17 18:39:08 +00:00
David Chisnall dd84ef1e62 Add a -ftrapv-handler= option which allows a handler to invoke instead of simply aborting when a signed operation overflows. This mirrors the (GCC-incompatible) behaviour from clang 1.0 and 1.1 when -ftrapv was specified, but allows the handler to be defined for each compilation unit.
llvm-svn: 114192
2010-09-17 18:29:54 +00:00
Jim Grosbach 0d35df1cfe handle the upper16/lower16 target operand flags on symbol references for MC
instruction lowering.

llvm-svn: 114191
2010-09-17 18:25:25 +00:00
Chris Lattner cea0a8d7ae fix rdar://8444631 - encoder crash on 'enter'
What a weird instruction.

llvm-svn: 114190
2010-09-17 18:02:29 +00:00
Gabor Greif 89c416ca98 fix comments; patch by Edmund Grimley-Evans\!
llvm-svn: 114189
2010-09-17 17:52:00 +00:00
Greg Clayton e2ae97f267 We now have SBStream that mirrors the generic stream classes we
use inside lldb (lldb_private::StreamFile, and lldb_private::StreamString).

llvm-svn: 114188
2010-09-17 17:42:16 +00:00
Argyrios Kyrtzidis d059997000 Use a temporary file for output which gets renamed after all the writing is finished.
This mainly prevents failures and/or crashes when multiple processes try to read/write the same PCH file. (rdar://8392711&8294781); suggestion & review by Daniel!

llvm-svn: 114187
2010-09-17 17:38:48 +00:00
Duncan Sands 922563cc6d Some of the tests build an executable with llvm-gcc. For this to work, llvm-gcc
needs to find some libraries, which may require searching the directories given
by LIBRARY_PATH on curiously configured systems.  So pass on LIBRARY_PATH.

llvm-svn: 114186
2010-09-17 17:05:27 +00:00
John McCall 00f1a67ad3 Fix test for no-asserts builds.
llvm-svn: 114185
2010-09-17 17:03:41 +00:00
Daniel Dunbar baad46c6ee Fix an MSVC warning.
llvm-svn: 114184
2010-09-17 16:34:24 +00:00
Jim Grosbach a7d430b51c expand PICLDR MC lowering to handle other PICLDR and PICSTR versions.
llvm-svn: 114183
2010-09-17 16:25:52 +00:00
Fariborz Jahanian 5bbd1b0051 Patch to add IRgen support for Gnu's conditional operator
extension when missing LHS. This patch covers scalar
conditionals only. Others are wip.
(pr7726, radar 8353567).

llvm-svn: 114182
2010-09-17 15:51:28 +00:00
Daniel Dunbar 35a7a0ee2e MC/Mach-O/i386: Fix a crash in relocation handling.
llvm-svn: 114176
2010-09-17 15:21:50 +00:00
NAKAMURA Takumi ab5077ab71 Move the declaration SetInformationJobObject() outside of namespace.
It is also workaround for PR7927.

llvm-svn: 114175
2010-09-17 11:14:18 +00:00
Gabor Greif 433c9e146a rename variable, 'Type' seems to be present in
the enclosing scope, which confuses gcc v3.4 to no end

llvm-svn: 114174
2010-09-17 10:21:45 +00:00
NAKAMURA Takumi 018f965a77 AlphaSchedule.td: 7bit-ize.
llvm-svn: 114173
2010-09-17 09:56:43 +00:00
Daniel Dunbar 00aff04c8d Driver/DarwinClang: Add GCC libexec paths so we can find the cc1 binaries if we
ever use fallback.
 - Not necessary for clang as a compiler, but useful for testing purposes.

llvm-svn: 114172
2010-09-17 08:22:12 +00:00
Daniel Dunbar 195fa00399 IRgen: Change CodeGenPasses to be a PassManager, so it can have CallGraphSCC or
Module. Patch by Mike Gist!

llvm-svn: 114171
2010-09-17 07:35:16 +00:00
Michael J. Spencer 386fe51f64 docs: Update GettingStartedVS to reflect current state.
llvm-svn: 114167
2010-09-17 06:33:20 +00:00
Daniel Dunbar 14287de654 Reapply "Driver/Darwin: Time for another spin at switching to the DarwinClang",
now that eprintf symbol issue is resolved.

llvm-svn: 114166
2010-09-17 04:25:28 +00:00
Daniel Dunbar a69a595c2b System: Don't reexport ___eprintf when building with Clang; this symbol isn't
used on Darwin anymore, and Clang might not always link with the library it is
currently found in.

llvm-svn: 114165
2010-09-17 04:25:24 +00:00
Daniel Dunbar e4f65f3885 Revert "Driver/Darwin: Time for another spin at switching to the DarwinClang
toolchain.", while I investigate the totally non-surprising ensuing breakage.

llvm-svn: 114164
2010-09-17 03:46:37 +00:00
Oscar Fuentes d890a54353 tests/CMakeLists.txt: use `configure_file' instead of `sed'.
The Windows users will appreciate this.

llvm-svn: 114158
2010-09-17 03:22:21 +00:00
Sean Callanan 61da09bbc8 Re-committed AddMethodToCXXRecordType, now that
the bug I introduced to ClangASTContext is
resolved.

llvm-svn: 114157
2010-09-17 02:58:26 +00:00
Daniel Dunbar 7eba1bf0b7 Fix this test to use -cc1.
llvm-svn: 114156
2010-09-17 02:47:35 +00:00
Daniel Dunbar 1b09e04f9e Driver: Support -dumpmachine.
llvm-svn: 114155
2010-09-17 02:47:28 +00:00
Daniel Dunbar 55f16678e4 MC/AsmParser: Add support for 'a + 4@GOTPCREL' and friends, by reconsing the
expression to include the modifier.
 - Gross, but this a corner case we don't expect to see often in practice, but
   it is worth accepting.
 - Also improves diagnostics on invalid modifiers.

llvm-svn: 114154
2010-09-17 02:47:07 +00:00
John McCall 769250ea70 Currently we're initializing the vtable pointers of a class only after
the bases are completely initialized.  This won't work --- base
initializer expressions can rely on the vtables having been set up.
Check for uses of 'this' in the initializers and force a vtable
initialization if found.

This might not be good enough;  we might need to extend this to handle
the possibility of arbitrary code finding an external reference to this
(not yet completely-constructed!) object and accessing through it,
in which case we'll probably find ourselves doing a lot more unnecessary
stores.

llvm-svn: 114153
2010-09-17 02:31:44 +00:00
Sean Callanan 6fe64b528d Added a static function to get the void type for
an ASTContext; also added a function to get the
Clang-style CVR qualifiers for a type as an
unsigned int.

llvm-svn: 114152
2010-09-17 02:24:29 +00:00
Oscar Fuentes 144d99d084 Updated GettingStartedVS.html to reflect current state.
Reorganized it too.

llvm-svn: 114151
2010-09-17 02:17:13 +00:00
Daniel Dunbar a7afcf92d1 Driver/Darwin: Time for another spin at switching to the DarwinClang toolchain.
llvm-svn: 114149
2010-09-17 01:56:41 +00:00
Dan Gohman 18fa17cf3d Fix the folding of floating-point math library calls, like sin(infinity),
so that it detects errors on platforms where libm doesn't set errno.
It's still subject to host libm details though.

llvm-svn: 114148
2010-09-17 01:38:06 +00:00
Daniel Dunbar 3f7796fc22 Driver: Fix spelling of AddCXXStdlibLibArgs, which I copy-n-pasto'd.
llvm-svn: 114147
2010-09-17 01:20:05 +00:00
Daniel Dunbar 8fa86b1a44 Driver/DarwinClang: The new toolchain definition is going to drop the -L inside
the GCC dir. Unfortunately, this breaks -lstdc++ on SnowLeopard, etc. because
the libstdc++ dylib was hiding there. Workaround this by providing the path to
the right -lstdc++.6 (the only version used in recent memory) if we can't see an
obvious -lstdc++, but can find = -lstdc++.6.

llvm-svn: 114146
2010-09-17 01:16:06 +00:00
John McCall 7f9c92a9a0 When emitting a new-expression inside a conditional expression,
the cleanup might not be dominated by the allocation code.
In this case, we have to store aside all the delete arguments
in case we need them later.  There's room for optimization here
in cases where we end up not actually needing the cleanup in
different branches (or being able to pop it after the
initialization code).

Also make sure we only call this operator delete along the path
where we actually allocated something.

Fixes rdar://problem/8439196.

llvm-svn: 114145
2010-09-17 00:50:28 +00:00
Daniel Dunbar 2cc3f17a26 Driver: Add magic handling for "reserved library names", starting with
-lstdc++. This is the best gross solution for a gross problem.

This issue is that historically, GCC has add -L options to its internally
library directories. This has allowed users and platforms to end up depending on
the layout of GCC's internal library directories.

We want to correct this mistake by eliminating that -L, but this means that
existing libraries which are in the GCC lib dir won't be found. We are going to
handle this by treating those -l names as "reserved", and requiring toolchains
to know how to add the right full path to the reserved library.

The immediately side effect of this is that users trying to use -L to find their
own -lstdc++ will need to start using -nostdlib (which is a good idea
anyway). Another side effect is that -stdlib=libc++ -lstdc++ will now do the
"right" thing, for curious definitions of right.

llvm-svn: 114144
2010-09-17 00:45:02 +00:00
Oscar Fuentes 80a32d62f6 Updated LLVMLibDeps.cmake
llvm-svn: 114143
2010-09-17 00:43:53 +00:00
Ted Kremenek 6174ca456f Handle '#line' in '-E' that has an empty file name. Fixes <rdar://problem/8439412>.
llvm-svn: 114142
2010-09-17 00:41:18 +00:00
Dan Gohman 2fa59799d9 Add an #include of raw_ostream.h. Previously, this only compiled
because it was using Twine.h's declaration of operator<<(const Twine &).

llvm-svn: 114141
2010-09-17 00:33:43 +00:00
Bill Wendling 214514a43d Add "pointer to x86mmx" type to the intrinsics.
llvm-svn: 114140
2010-09-17 00:33:03 +00:00
Oscar Fuentes 9712b2c06c Direct CMake users to the right place for up-to-date info about using
LLVM libraries.

llvm-svn: 114139
2010-09-17 00:30:52 +00:00
Daniel Dunbar 54423b2a86 Driver: Factor out AddLinkerInputs() function.
llvm-svn: 114138
2010-09-17 00:24:54 +00:00
Daniel Dunbar 62123a12f1 Driver: Add a toolchain hook for whether the system has native LLVM support.
llvm-svn: 114137
2010-09-17 00:24:52 +00:00
Douglas Gregor 009f69979a When dealing with an anonymous enumeration declared in function
prototype scope, temporarily set the context of the enumeration
declaration to the translation unit. We do the same thing for
parameters, until we have an actual function declaration on which to
hang them. Fixes <rdar://problem/8435682>.

There is more work to do in this area, since we have existing bugs
with tags being declared/defined in function parameter lists. This fix
is correct, and we'll end up extending it when we deal with those
existing bugs.

llvm-svn: 114135
2010-09-16 23:58:57 +00:00
Johnny Chen 2756d60563 Added extra test scenarios to break on a selector with:
(lldb) breakpoint set -S description

and a compilation unit defined instance method with:

(lldb) breakpoint set -n '-[MyString initWithNSString:]'

llvm-svn: 114134
2010-09-16 23:57:33 +00:00
Johnny Chen 4a0a048cf8 Reverted r114125, r114124, and r114123 as it broke the test suite - segfaults
when running test/class_types.

llvm-svn: 114132
2010-09-16 23:51:14 +00:00
Owen Anderson c2fcd6106c Allow the PassRegistry mutex to be lazily initialized, and clean up the global namespace at the same time.
llvm-svn: 114131
2010-09-16 23:44:50 +00:00
Owen Anderson d878827107 Do not expose the locking for the PassRegistry in the header. Be careful to
synchronize any method that might lazily initialize the pImpl.

llvm-svn: 114130
2010-09-16 23:32:35 +00:00
Howard Hinnant d8e7922ba2 Tweak clang support for char16_t/char32_t
llvm-svn: 114129
2010-09-16 23:27:26 +00:00
Benjamin Kramer d61e3833a3 Update CMake build.
llvm-svn: 114128
2010-09-16 23:06:18 +00:00