llvm-6502/lib/IR
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
..
AsmWriter.cpp Make some assertions on constant expressions static. 2014-03-15 18:47:07 +00:00
AsmWriter.h IR: add a second ordering operand to cmpxhg for failure 2014-03-11 10:48:52 +00:00
AttributeImpl.h [C++11] Add 'override' keyword to IR library. 2014-03-05 06:35:38 +00:00
Attributes.cpp Revert "[C++11] Replace LLVM atomics with std::atomic." 2014-03-03 18:02:34 +00:00
AutoUpgrade.cpp [C++11] Add range based accessors for the Use-Def chain of a Value. 2014-03-09 03:16:01 +00:00
BasicBlock.cpp [C++11] Add range based accessors for the Use-Def chain of a Value. 2014-03-09 03:16:01 +00:00
CMakeLists.txt [Modules] Move the ConstantRange class into the IR library. This is 2014-03-04 12:24:34 +00:00
ConstantFold.cpp [Modules] Move GetElementPtrTypeIterator into the IR library. As its 2014-03-04 10:40:04 +00:00
ConstantFold.h
ConstantRange.cpp [Modules] Move the ConstantRange class into the IR library. This is 2014-03-04 12:24:34 +00:00
Constants.cpp [C++11] Add range based accessors for the Use-Def chain of a Value. 2014-03-09 03:16:01 +00:00
ConstantsContext.h [C++11] Add 'override' keyword to IR library. 2014-03-05 06:35:38 +00:00
Core.cpp Remove the linker_private and linker_private_weak linkages. 2014-03-13 23:18:37 +00:00
DataLayout.cpp [C++11] Modernize the IR library a bit. 2014-03-10 15:03:06 +00:00
DebugInfo.cpp remove a bunch of unused private methods 2014-03-23 17:09:26 +00:00
DebugLoc.cpp [Layering] Move DebugInfo.h into the IR library where its implementation 2014-03-06 00:46:21 +00:00
DiagnosticInfo.cpp Use DiagnosticInfo facility. 2014-03-14 21:58:59 +00:00
DiagnosticPrinter.cpp Report a warning when dropping outdated debug info metadata. 2014-01-16 01:51:12 +00:00
DIBuilder.cpp Switch the type field in DIVariable and DIGlobalVariable over to DITypeRefs. 2014-03-18 02:34:58 +00:00
Dominators.cpp [Modules] Move CFG.h to the IR library as it defines graph traits over 2014-03-04 11:45:46 +00:00
Function.cpp Revert r203488 and r203520. 2014-03-12 18:09:37 +00:00
GCOV.cpp llvm-cov: Handle functions with no line number 2014-03-26 22:03:06 +00:00
Globals.cpp Prevent alias from pointing to weak aliases. 2014-03-27 15:26:56 +00:00
GVMaterializer.cpp [Layering] Move GVMaterializer.h into the IR library where its 2014-03-06 03:50:29 +00:00
InlineAsm.cpp Remove copy ctors that did the same thing as the default one. 2014-03-11 11:32:49 +00:00
Instruction.cpp IR: add a second ordering operand to cmpxhg for failure 2014-03-11 10:48:52 +00:00
Instructions.cpp IR: add a second ordering operand to cmpxhg for failure 2014-03-11 10:48:52 +00:00
IntrinsicInst.cpp Remove spurious emacs major mode marker, these should only go on .h files. 2014-02-26 03:10:45 +00:00
IRBuilder.cpp
IRPrintingPasses.cpp [C++11] Add 'override' keyword to IR library. 2014-03-05 06:35:38 +00:00
LeakDetector.cpp [Modules] Move the LeakDetector header into the IR library where the 2014-03-04 12:46:06 +00:00
LeaksContext.h Revert "Give internal classes hidden visibility." 2013-09-11 18:05:11 +00:00
LegacyPassManager.cpp [C++11] Add 'override' keyword to IR library. 2014-03-05 06:35:38 +00:00
LLVMBuild.txt
LLVMContext.cpp Add 'remark' diagnostic type in LLVM 2014-02-28 09:08:45 +00:00
LLVMContextImpl.cpp Add warning capabilities in LLVM. 2013-12-17 17:47:22 +00:00
LLVMContextImpl.h [C++11] Add 'override' keyword to IR library. 2014-03-05 06:35:38 +00:00
Makefile Actually update the CMake and Makefile builds correctly, and update the 2013-01-02 12:09:16 +00:00
Mangler.cpp Remove the linker_private and linker_private_weak linkages. 2014-03-13 23:18:37 +00:00
Metadata.cpp [C++11] Modernize the IR library a bit. 2014-03-10 15:03:06 +00:00
Module.cpp Module: Don't rename in getOrInsertFunction() 2014-03-10 23:42:28 +00:00
Pass.cpp [C++11] Add 'override' keyword to IR library. 2014-03-05 06:35:38 +00:00
PassManager.cpp Fix comment (PR19188) 2014-03-19 18:41:38 +00:00
PassRegistry.cpp [opt][PassInfo] Allow opt to run passes that need target machine. 2014-01-16 21:44:34 +00:00
SymbolTableListTraitsImpl.h
Type.cpp Mark some Type and EVT methods as LLVM_READONLY. 2013-12-28 16:17:26 +00:00
TypeFinder.cpp TypeFinder: prefer iterative algorithm to keep stack usage low. 2013-10-16 04:10:06 +00:00
Use.cpp [cleanup] Add a getOperandNo method to the Use class and implement it 2014-03-04 09:19:43 +00:00
User.cpp Disable Visual C++ warning 4722 about aborting a destructor, 2014-03-25 08:42:49 +00:00
Value.cpp [C++11] Add range based accessors for the Use-Def chain of a Value. 2014-03-09 03:16:01 +00:00
ValueSymbolTable.cpp
ValueTypes.cpp Add v4f16 to supported value types. 2013-10-03 03:29:21 +00:00
Verifier.cpp Prevent alias from pointing to weak aliases. 2014-03-27 15:26:56 +00:00