Commit Graph

17888 Commits

Author SHA1 Message Date
Argyrios Kyrtzidis 3d3208675f When the out-of-line definition differs from the declaration in the return type,
say "out-of-line definition differ from the declaration in the return type" instead of
the silly "functions that differ only in their return type cannot be overloaded".

Addresses rdar://7980179.

llvm-svn: 124939
2011-02-05 05:54:49 +00:00
Anders Carlsson 3c23948481 Re-land r124768, with a fix for PR9130.
We now emit everything except unused implicit virtual member functions when building the vtable.

llvm-svn: 124935
2011-02-05 04:35:53 +00:00
Ted Kremenek 6c9cd14bf9 Don't suggest -Wuninitialized fixits for uninitialized enum types.
llvm-svn: 124924
2011-02-05 01:18:18 +00:00
Fariborz Jahanian c9b7c209bb -Wselector should warn on implemented selectors only
when selector metadata is generated, which is triggered 
by at least on class implementation. This is to match gcc's
behavior. // rdar://8851684.

llvm-svn: 124909
2011-02-04 23:19:27 +00:00
John McCall 490112f7bf Assert during instantiation of blocks that we've captured everything that
we captured in the dependent case.

llvm-svn: 124887
2011-02-04 18:33:18 +00:00
Bob Wilson d1447c45fa Add better support for ARM EABI triples.
Patch by Renato Golin!

llvm-svn: 124878
2011-02-04 17:59:28 +00:00
Daniel Dunbar 80f787c1c1 Driver: Fix spurious warning (from -cc1) about unused -fapple-kext on C inputs.
llvm-svn: 124875
2011-02-04 17:24:47 +00:00
Douglas Gregor a522693f66 Improve our handling of the current instantiation for qualified
id-expression, e.g., 

  CurrentClass<T>::member

Previously, if CurrentClass<T> was dependent and not complete, we
would treat it as a dependent-scoped declaration reference expression,
even if CurrentClass<T> referred to the current instantiation.

Fixes PR8966 and improves type checking of templates.

llvm-svn: 124867
2011-02-04 13:35:07 +00:00
Douglas Gregor 789adec6bd Before checking bitfield initialization, make sure that neither the
bit-field width nor the initializer value are type- or
value-dependent. Fixes PR8712.

llvm-svn: 124866
2011-02-04 13:09:01 +00:00
Douglas Gregor 125fa40c34 When calling a bound pointer to member function, check the
cv-qualifiers on the object against the cv-qualifiers on the member
function. Fixes PR8315.

llvm-svn: 124865
2011-02-04 12:57:49 +00:00
Douglas Gregor 4d5c297607 Tweak my fix for PR8748, and update the incorrect PR number in the test case.
llvm-svn: 124863
2011-02-04 12:22:53 +00:00
Douglas Gregor 87866ceda7 Implement proper (de-)serialization for explicit template argument
lists with zero template arguments. Fixes some seriously scary
crashers in C++ PCH.

llvm-svn: 124862
2011-02-04 12:01:24 +00:00
Douglas Gregor 0fcaac9ef3 Fix a crash-on-invalid where we were trying to parse C++ constructs in
C, then hitting an assertion because C code shouldn't try to parse
optional nested-name-specifiers. Fixes PR9137.

llvm-svn: 124860
2011-02-04 11:57:16 +00:00
Ted Kremenek d68ec818c3 Downgrade error about attribute 'iboutlet' and 'ibaction' being applied to anything but a instance method to a warning.
llvm-svn: 124858
2011-02-04 06:54:16 +00:00
Douglas Gregor a99fb4c77d Tighten up the semantics of default template arguments, per C++0x
[temp.param]p9 and C++ DR226. Fixes PR8747.

llvm-svn: 124856
2011-02-04 04:20:44 +00:00
Douglas Gregor 8b481d8ac2 When a function template's template parameter has a default argument,
it's okay for the following template parameters to not have default
arguments (since those template parameters can still be
deduced). Also, downgrade the error about default template arguments
in function templates to an extension warning, since this is a
harmless C++0x extension.

llvm-svn: 124855
2011-02-04 03:57:22 +00:00
Daniel Dunbar 7aa71f9423 build: Add support for DISABLE_DEFAULT_STRICT_ALIASING, which does what one
might expect.

llvm-svn: 124848
2011-02-04 02:20:39 +00:00
Fariborz Jahanian e28342c401 minor refactoring of -fapple-kext stuff.
llvm-svn: 124837
2011-02-04 00:32:39 +00:00
Fariborz Jahanian 7cadb2f65b What was I thinking?
llvm-svn: 124835
2011-02-04 00:08:13 +00:00
Fariborz Jahanian f7f04458b3 -fapple-kext cannot have 'weak' visibility in this
abi.

llvm-svn: 124834
2011-02-04 00:01:24 +00:00
Douglas Gregor 149239651d If any Fix-Its attached to a diagnostic have invalid source locations
or source locations that refer into a macro instantiation, delete all
of the Fix-Its on that diagnostic.

llvm-svn: 124833
2011-02-03 23:41:12 +00:00
Oscar Fuentes edeaf16f2c Moved here from LLVM Clang's configuration options and related macros.
llvm-svn: 124825
2011-02-03 22:48:20 +00:00
Argyrios Kyrtzidis 58f8b590e1 [analyzer] Fix a crash until we can handle temporary struct objects properly.
llvm-svn: 124822
2011-02-03 22:01:32 +00:00
Douglas Gregor 7c60768590 Add __has_feature() for each of the type traits
llvm-svn: 124820
2011-02-03 21:57:35 +00:00
Fariborz Jahanian 7f6f81ba9b Clean up of -fapple-kext abi code. No change otherwise.
llvm-svn: 124807
2011-02-03 19:27:17 +00:00
Argyrios Kyrtzidis 7272d9cf36 Implement -Woverloaded-virtual.
The difference with gcc is that it warns if you overload virtual methods only if
the method doesn't also override any method. This is to cut down on the number of warnings
and make it more useful like reported here: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20423.
If we want to warn that not all overloads are overriden we can have an additional
warning like -Wpartial-override.

-Woverloaded-virtual, unlike gcc, is added to -Wmost. Addresses rdar://8757630.

llvm-svn: 124805
2011-02-03 18:01:15 +00:00
Douglas Gregor e664276bcf Teach SourceManager::getLocation() how to cope with a source file
whose inode has changed since the file was first created and that is
being seen through a different path name (e.g., due to symlinks or
relative path elements), such that its FileEntry pointer doesn't match
a known FileEntry pointer. Since this requires a system call (to
stat()), we only perform this deeper checking if we can't find the
file by comparing FileEntry pointers.

Also, add a micro-optimization where we don't bother to compute line
numbers when given the location (1, 1). This improves the
efficiency of clang_getLocationForOffset().
 

llvm-svn: 124800
2011-02-03 17:17:35 +00:00
John McCall 5f2d556a92 Capture a few implicit references to 'self'.
llvm-svn: 124786
2011-02-03 09:00:02 +00:00
John McCall f3a8860ee1 More capturing of 'this': implicit member expressions. Getting that
right for anonymous struct/union members led to me discovering some
seemingly broken code in that area of Sema, which I fixed, partly by  
changing the representation of member pointer constants so that    
IndirectFieldDecls aren't expanded.  This led to assorted cleanups with   
member pointers in CodeGen, and while I was doing that I saw some random
other things to clean up.                   

llvm-svn: 124785
2011-02-03 08:15:49 +00:00
Rafael Espindola af5b92e8f7 Revert 124768.
This reopens PR99114, but that one at least can be avoided with an #include.
PR9130 cannot.

llvm-svn: 124780
2011-02-03 06:30:58 +00:00
Rafael Espindola 5b55454065 Revert 124754 and 124760 as they made clang unusable in the presence of symbolic
links.

llvm-svn: 124776
2011-02-03 04:35:45 +00:00
Daniel Dunbar 9aa47fcb55 Frontend: Switch -header-include-file output to use unbuffered raw_ostreams with
the atomic writes option, since the intent is that this option be set for an
entire build, which may have any number of compiler instances writing to the
same output file.

llvm-svn: 124772
2011-02-03 03:45:00 +00:00
Anders Carlsson bac84bef65 Don't try to mark virtual members referenced for classes where the key function
is not defined in the current translation unit. Doing so lead to compile errors
such as PR9114.

Instead, when CodeGen is building the vtable, don't try to emit a definition
for functions that aren't marked used in the current translation unit.
Fixes PR9114.

llvm-svn: 124768
2011-02-03 02:08:44 +00:00
Douglas Gregor 8c0577faf3 Improve the performance of filename canonicalization by avoiding
redundant searches in the string. No functionality change.

llvm-svn: 124760
2011-02-03 00:18:12 +00:00
Ted Kremenek b3dbe28e31 Based on user feedback, swap -Wuninitialized diagnostics to have the warning refer to the bad use, and the note to the variable declaration.
llvm-svn: 124758
2011-02-02 23:35:53 +00:00
Fariborz Jahanian 0c12ed1429 -fapple-kext, elimination of all direct calls to virtual dtors.
llvm-svn: 124757
2011-02-02 23:12:46 +00:00
Devang Patel 84ffdd9ba3 Emit debug info for template value parameters.
llvm-svn: 124756
2011-02-02 22:36:18 +00:00
Douglas Gregor 3c0d263abb Canonicalize path names in the file manager before performing a lookup
on that name. Canonicalization eliminates silliness such as "." and
"foo/.." that breaks the uniquing of files in the presence of virtual
files or files whose inode numbers have changed during
parsing/re-parsing. c-index-test isn't able to create this crazy
situation, so I've resorted to testing outside of the Clang
tree. Fixes <rdar://problem/8928220>.

Note that this hackery will go away once we have a real virtual file
system on which we can layer FileManager; the virtual-files hack is
showing cracks.

llvm-svn: 124754
2011-02-02 22:30:17 +00:00
Devang Patel e3773c2f51 Emit debug info for template type parameters.
llvm-svn: 124753
2011-02-02 21:38:49 +00:00
Daniel Dunbar ac540b3859 clang: Add support for a CC_PRINT_HEADERS environment variable, which mirrors
CC_PRINT_OPTIONS and can be used to get some out-of-band information on header
usage from a build.

llvm-svn: 124751
2011-02-02 21:11:35 +00:00
Daniel Dunbar 1af1d2751a Frontend: Add -header-include-file option, for allowing saving header include
information to a file.

llvm-svn: 124750
2011-02-02 21:11:31 +00:00
Daniel Dunbar fb24485727 Frontend: Add support (unused) for showing all "interesting" headers, not just
ones outside the predefines buffer (which is what -H does).

llvm-svn: 124749
2011-02-02 21:11:24 +00:00
Fariborz Jahanian 09b2331cf7 For gcc compatibility, size of a class which is zero
but has non-empty data fields, such as array of zero length,
remains zero.
// rdar://8945175

llvm-svn: 124741
2011-02-02 19:36:18 +00:00
Douglas Gregor ac18130050 Revert r124704, which uniqued code-completion strings. The space
savings of 25% sounds impressive, except that this amounted to only
about 360k in our standard "large" completion result set (40,000
results). Since code completion is performance-sensitive, the 4%
slowdown due to uniquing outweighs the 360k benefit. 

llvm-svn: 124737
2011-02-02 19:04:30 +00:00
Benjamin Kramer 24f1d3e60a Add NetBSD target support. Patch by Joerg Sonnenberger.
llvm-svn: 124736
2011-02-02 18:59:27 +00:00
Argyrios Kyrtzidis 83b797f490 Don't warn for -Wnon-virtual-dtor for dependent classes.
llvm-svn: 124735
2011-02-02 18:47:41 +00:00
Daniel Dunbar 27734fdbbf Frontend: Factor out header include dumping (-H) into its own preprocessor
callbacks class.
 - Aside from being generally cleaner, this also allows -H to work correctly in
   modes other than standard preprocessing (e.g., -c, -MM, etc.)

llvm-svn: 124723
2011-02-02 15:41:17 +00:00
John McCall c63de66c4f An insomniac stab at making block declarations list the variables they close
on, as well as more reliably limiting invalid references to locals from
nested scopes.

llvm-svn: 124721
2011-02-02 13:00:07 +00:00
Nick Lewycky 75033770f4 Turn on -momit-leaf-frame-pointer by default on all non-Darwin platforms.
Fixes PR9121!

llvm-svn: 124718
2011-02-02 06:43:03 +00:00
Ted Kremenek ae022096db Remove redundant check to not warn for warn_equality_with_extra_parens if we are in a macro. This is checked twice.
llvm-svn: 124714
2011-02-02 02:20:30 +00:00
Douglas Gregor 801acff462 Unique code-completion strings. On Cocoa.h, this costs us about 4% in
speed but saves us about 25% of the memory usage for strings.

llvm-svn: 124704
2011-02-01 23:59:42 +00:00
John McCall 71de91cc09 When diagnosing address-space changes, apply array-to-pointer decay first.
llvm-svn: 124702
2011-02-01 23:28:01 +00:00
Fariborz Jahanian 265c325ef3 -fapple-kext support for indirect call to virtuals dtors - wip.
llvm-svn: 124701
2011-02-01 23:22:34 +00:00
Nick Lewycky 22197c1334 Add support for x86-64 Mandriva 2010.2. Reported by 'rindolf' on IRC!
llvm-svn: 124699
2011-02-01 23:03:29 +00:00
Douglas Gregor bcbf46c7b7 Create a special allocator class for code completion, so that all of
the string copying goes through a single place that can have
associated state.

llvm-svn: 124698
2011-02-01 22:57:45 +00:00
Ted Kremenek c358d9f305 Don't warn about extraneous '()' around a comparison if it occurs within a macro.
Macros frequently contain extra '()' to make instantiation less error prone.
This warning was flagging a ton of times on postgresql because of its use of macros.

llvm-svn: 124695
2011-02-01 22:36:09 +00:00
Argyrios Kyrtzidis f4f8278c95 Don't warn for "if ((a == b))" if the parens came from a macro. Thanks to Fariborz for the hint!
llvm-svn: 124689
2011-02-01 22:23:56 +00:00
John McCall 2725aa13ea Do the right thing for zero-initializing VLAs that don't have a zero
bit-pattern.  It's not clear that this is actually useful given current
language restrictions.

llvm-svn: 124685
2011-02-01 21:35:06 +00:00
Nick Lewycky edda72658a Add updated Debian ARM include path.
llvm-svn: 124684
2011-02-01 21:32:14 +00:00
Douglas Gregor 304f9b0803 Provide constant strings for certain common code completion strings,
eliminating the need to copy those strings.

llvm-svn: 124683
2011-02-01 21:15:40 +00:00
Argyrios Kyrtzidis c1b4534e42 Fix the message. Thanks to Thomas Clement for noticing.
llvm-svn: 124680
2011-02-01 20:33:05 +00:00
Argyrios Kyrtzidis 582dd68541 For "if ((a == b))" only warn if 'a' is a modifiable l-value. Caught by John!
llvm-svn: 124675
2011-02-01 19:32:59 +00:00
Argyrios Kyrtzidis 15a3daa189 [analyzer] Slightly improve the diagnostic message of ObjCSelfInitChecker.
llvm-svn: 124674
2011-02-01 19:32:55 +00:00
Douglas Gregor b278aafbfb Allocate CodeCompletionString and all of its components in a
BumpPtrAllocator, rather than manually new/delete'ing them. This
optimization also allows us to avoid allocating memory for and copying
constant strings (e.g., "return", "class").

This also required embedding the priority and availability of results
within the code completion string, to avoid extra memory allocation
within libclang.

llvm-svn: 124673
2011-02-01 19:23:04 +00:00
Argyrios Kyrtzidis 8b6ec6870f Warn for "if ((a == b))" where the equality expression is needlessly wrapped inside parentheses.
It's highly likely that the user intended an assignment used as condition.

Addresses rdar://8848646.

llvm-svn: 124668
2011-02-01 18:24:22 +00:00
Ted Kremenek 5b4288440d Add temporary hack to -Wuninitialize to create a separate CFG (for C++ code) that doesn't include implicit dtors.
Implicit dtors confuse the ad hoc path-sensitivity of UninitializedValuesV2.cpp.  This isn't
the ideal solution, as it will directly impact compile time, but should significantly reduce
the noise of -Wuninitialized on some code bases.

This immediately "fixes" the false positive reported in PR 9063, although this
isn't the right fix in the long run.

llvm-svn: 124667
2011-02-01 17:43:21 +00:00
Ted Kremenek ba357296e7 Enhance -Wuninitialized to better reason about || and &&, tracking dual dataflow facts and properly merging them.
Fixes PR 9076.

llvm-svn: 124666
2011-02-01 17:43:18 +00:00
Douglas Gregor fa7781384e Implement access checking for the "delete" operator. Fixes PR9050,
from Alex Miller!

llvm-svn: 124663
2011-02-01 15:50:11 +00:00
Douglas Gregor 1732850158 Fix a thinko where I didn't update a consistency check for
PackExpansionType in the AST reader. We need more testing for variadic
templates + PCH, but this fixes PR9073.

llvm-svn: 124662
2011-02-01 15:24:58 +00:00
Douglas Gregor dbe3927026 Basic support for -mms-bitfields, from Carl Norum!
llvm-svn: 124661
2011-02-01 15:15:22 +00:00
Douglas Gregor de7a357a30 Support EFI target triple, from Carl Norum!
llvm-svn: 124660
2011-02-01 15:06:18 +00:00
John McCall 04fcd0d58f The code trying to assign a typedef to an anonymous tag declaration was
extremely rambunctious, both on parsing and on template instantiation.
Calm it down, fixing an internal consistency assert on anonymous enum
instantiation manglings.

llvm-svn: 124653
2011-02-01 08:20:08 +00:00
Rafael Espindola 88ea6ab44f Revert 124633. The linker has been told how to merge available_externally.
llvm-svn: 124651
2011-02-01 05:45:26 +00:00
Ken Dyck 316d6f69bc Convert RecordLayout::NonVirtualSize from bit units to CharUnits.
llvm-svn: 124646
2011-02-01 01:52:10 +00:00
Argyrios Kyrtzidis 0d349f9b8a When initializing struct members, the important thing is that the "initializing" expression is
compatible, not having the same type.

Fix rdar://8183908 in which compatible vector types weren't initialized properly leading to a crash.

llvm-svn: 124637
2011-02-01 00:52:10 +00:00
Rafael Espindola 9fa5a67d3d Set visibility for available_externally globals. This is important for two reasons:
* llvm-link would complains about mismatched visibility
* If we produce a relocation with an available_externally, it is good to know that
it is hidden.

llvm-svn: 124633
2011-02-01 00:37:17 +00:00
John McCall 4fff8f6cff Perform the bad-address-space conversions check as part of
CheckPointerTypesForAssignment.

llvm-svn: 124632
2011-02-01 00:10:29 +00:00
Argyrios Kyrtzidis b5b5a59f18 Improve the diagnostic for -Wcustom-atomic-properties. Suggestion by Fariborz!
llvm-svn: 124620
2011-01-31 23:20:03 +00:00
John McCall aba9082f0f Make Check*PointerTypesForAssignment private and tell them that they're
working on canonical types already.

llvm-svn: 124618
2011-01-31 23:13:11 +00:00
Douglas Gregor 86af98444f Harden Lexer::GetBeginningOfToken() against bogus source locations and
the disappearance/alteration of files.

llvm-svn: 124616
2011-01-31 22:42:36 +00:00
John McCall e5255935d5 Slightly reorganize CheckAssignmentConstraints and remove some redundant
logic.

llvm-svn: 124615
2011-01-31 22:28:28 +00:00
Douglas Gregor 7a964ad4ce Teach Diagnostic::setClient() to free the existing, owned
client. Fixes a libclang leak.

llvm-svn: 124614
2011-01-31 22:04:05 +00:00
Daniel Dunbar a2867c7741 libclang: Don't allow RemoveFileOnSignal to be called via libclang, badness can
ensue.

llvm-svn: 124613
2011-01-31 22:00:44 +00:00
Daniel Dunbar e326f9bb3e Frontend: Add an explicit RemoveFileOnSignal flag argument, to control the
automatic behavior (which is undesirable in a multithreaded context).

llvm-svn: 124612
2011-01-31 22:00:42 +00:00
Argyrios Kyrtzidis dd88dbf9d2 Add -Wcustom-atomic-properties which warns if an atomic-by-default property has custom getter or setter.
The rationale is that it is highly likely that the user's getter/setter isn't atomically implemented. Off by default.
Addresses rdar://8782645.

-Wcustom-atomic-properties and -Wimplicit-atomic-properties are under the -Watomic-properties group.

llvm-svn: 124609
2011-01-31 21:34:11 +00:00
Douglas Gregor 058d3deab8 Implement reasonable conversion ranking for Objective-C pointer
conversions (<rdar://problem/8592139>) for overload resolution. The
conversion ranking mirrors C++'s conversion ranking fairly closely,
except that we use a same pseudo-subtyping relationship employed by
Objective-C pointer assignment rather than simple checking
derived-to-base conversions. This change covers:

  - Conversions to pointers to a specific object type are better than
  conversions to 'id', 'Class', qualified 'id', or qualified 'Class'
  (note: GCC doesn't perform this ranking, but it matches C++'s rules
  for ranking conversions to void*).
  - Conversions to qualified 'id' or qualified 'Class' are better than
  conversions to 'id' or 'Class', respectively.
  - When two conversion sequences convert to the same type, rank the
  conversions based on the relationship between the types we're
  converting from. 
  - When two conversion sequences convert from the same non-id,
  non-Class type, rank the conversions based on the relationship of
  the types we're converting to. (note: GCC allows this ranking even
  when converting from 'id', which is extremeley dangerous).

llvm-svn: 124591
2011-01-31 18:51:41 +00:00
Argyrios Kyrtzidis 33799caf6d Only warn for -Wnon-virtual-dtor for public destructors. Thanks to Benjamin Kramer for the hint!
llvm-svn: 124585
2011-01-31 17:10:25 +00:00
Douglas Gregor 205d5e3a51 Implement the suggested resolution to core issue 547, extended to also
allow ref-qualifiers on function types used as template type
arguments. GNU actually allows cv-qualifiers on function types in many
places where it shouldn't, so we currently categorize this as a GNU
extension.

llvm-svn: 124584
2011-01-31 16:09:46 +00:00
Argyrios Kyrtzidis 7f3986dc64 Warn if the class has virtual methods but non-virtual destructor. Addresses rdar://8756445.
llvm-svn: 124582
2011-01-31 07:05:00 +00:00
Argyrios Kyrtzidis f46cc65f44 Don't warn that variables in C++ static member functions shadow fields. Fixes rdar://8900456.
llvm-svn: 124581
2011-01-31 07:04:54 +00:00
Argyrios Kyrtzidis 857dd06605 Fix the diagnostic when we are shadowing an external variable and there exists a locally scoped extern with the same name.
llvm-svn: 124580
2011-01-31 07:04:50 +00:00
Argyrios Kyrtzidis 819f610942 Diagnose if extern local variable is followed by non-extern and vice-versa.
llvm-svn: 124579
2011-01-31 07:04:46 +00:00
Argyrios Kyrtzidis f41860c882 'extern' variables in functions don't shadow externs in global scope. Fixes rdar://8883302.
llvm-svn: 124578
2011-01-31 07:04:41 +00:00
Argyrios Kyrtzidis 77fd99f8ae If there were errors, disable 'unused' warnings since they will mostly be noise.
Fixes rdar://8736362.

llvm-svn: 124577
2011-01-31 07:04:37 +00:00
Argyrios Kyrtzidis b85cd7c312 Error for use of field from anonymous struct or union should say "invalid use of nonstatic data member"
not "call to non-static member function without an object argument".

llvm-svn: 124576
2011-01-31 07:04:33 +00:00
Argyrios Kyrtzidis 8322b426a5 Amazing that there are still issues with the fields of anonymous struct/unions..
Allow taking the address of such a field for a pointer-to-member constant. Fixes rdar://8818236.

llvm-svn: 124575
2011-01-31 07:04:29 +00:00
Francois Pichet 79f3a87007 Allow Microsoft attributes in a constructor's parameter list.
This fixes a few compile errors when parsing <regex> from MSVC 2008 with clang.

llvm-svn: 124573
2011-01-31 04:54:32 +00:00
Anders Carlsson a03f3a85cb When building with optimizations, emit vtables where the key is not in the
current translation unit as available_externally. 

This helps devirtualize the second example in PR3100, comment 18:

struct S { S() {}; virtual void xyzzy(); };
inline void foo(S *s) { s->xyzzy(); }
void bar() { S s; foo(&s); }

This involved four major changes:

1. In DefineUsedVTables, always mark virtual member functions as referenced for
   non-template classes and class template specializations.
2. In CodeGenVTables::ShouldEmitVTableInThisTU return true if optimizations are
   enabled, even if the key function is not implemented in this translation 
   unit. We don't ever do this for code compiled with -fapple-kext, because we
   don't ever want to devirtualize virtual member function calls in that case.
3. Give the correct linkage for vtables where the key function is not defined.
4. Update the linkage for RTTI structures when necessary.

llvm-svn: 124565
2011-01-30 20:45:54 +00:00
Roman Divacky 115f0fa397 Add hardcoded -L/usr/lib after all -L options to the FreeBSD linker
invocation. 

This mimics what gcc does and fixes libtool check for libraries.

llvm-svn: 124558
2011-01-30 08:12:24 +00:00
Anders Carlsson 5b48bf70a8 Remove dead code.
llvm-svn: 124554
2011-01-29 22:15:18 +00:00