llvm-6502/include/llvm
Rafael Espindola f165cf7ce8 Prevent alias from pointing to weak aliases.
This adds back r204781.

Original message:

Aliases are just another name for a position in a file. As such, the
regular symbol resolutions are not applied. For example, given

define void @my_func() {
  ret void
}
@my_alias = alias weak void ()* @my_func
@my_alias2 = alias void ()* @my_alias

We produce without this patch:

        .weak   my_alias
my_alias = my_func
        .globl  my_alias2
my_alias2 = my_alias

That is, in the resulting ELF file my_alias, my_func and my_alias are
just 3 names pointing to offset 0 of .text. That is *not* the
semantics of IR linking. For example, linking in a

@my_alias = alias void ()* @other_func

would require the strong my_alias to override the weak one and
my_alias2 would end up pointing to other_func.

There is no way to represent that with aliases being just another
name, so the best solution seems to be to just disallow it, converting
a miscompile into an error.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204934 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-27 15:26:56 +00:00
..
ADT When destroying a StringMap, just iterate over the map and destroy the contained elements. Don't reset them back to 0 as their values aren't needed any more. This results in ~StringMap() being mostly empty for POD types in BumpPtrAllocators 2014-03-19 00:23:30 +00:00
Analysis blockfreq: Implement Pass::releaseMemory() 2014-03-25 18:01:38 +00:00
AsmParser
Bitcode Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
CodeGen Simplify PBQP graph removeAdjEdgeId implementation. 2014-03-26 21:21:53 +00:00
Config static link polly into tools 2014-03-14 04:04:14 +00:00
DebugInfo DebugInfo: Support debug_loc under fission 2014-03-25 01:44:02 +00:00
ExecutionEngine [MCJIT] Check if there have been errors during RuntimeDyld execution. 2014-03-26 18:19:27 +00:00
IR Prevent alias from pointing to weak aliases. 2014-03-27 15:26:56 +00:00
IRReader
LineEditor Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
Linker [Layering] Sink Linker.h into a Linker subdirectory to make it 2014-03-06 03:42:23 +00:00
LTO Replace OwningPtr<T> with std::unique_ptr<T>. 2014-03-06 05:51:42 +00:00
MC Add missing #include <cassert> to MCSymbolizer.h. 2014-03-27 02:58:32 +00:00
Object [RuntimeDyld] Allow processRelocationRef to process more than one relocation entry at a time. 2014-03-21 07:26:41 +00:00
Option [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-05 07:52:44 +00:00
ProfileData InstrProf: Check pointer size in raw profile 2014-03-23 03:38:12 +00:00
Support [cleanup] Run clang-format over these routines to remove formatting 2014-03-27 09:56:23 +00:00
TableGen
Target Change @llvm.clear_cache default to call rt-lib 2014-03-26 14:01:32 +00:00
Transforms Remove LowerInvoke's obsolete "-enable-correct-eh-support" option 2014-03-20 19:54:47 +00:00
CMakeLists.txt
InitializePasses.h
LinkAllIR.h
LinkAllPasses.h
Pass.h
PassAnalysisSupport.h
PassManager.h
PassRegistry.h
PassSupport.h