summaryrefslogtreecommitdiffstats
path: root/llvm/test/Linker/Inputs/override-with-internal-linkage-2.ll
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-04-22 04:11:00 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-04-22 04:11:00 +0000
commite868123d8fd38a131d7f2c5fec7d71c1cdbb9b1e (patch)
tree95799068d62197f24a3a2d1f7d5a490fc5c209bb /llvm/test/Linker/Inputs/override-with-internal-linkage-2.ll
parent0de129d42195bcc53ff8cf287d80a2b91c8cde16 (diff)
downloadbcm5719-llvm-e868123d8fd38a131d7f2c5fec7d71c1cdbb9b1e.tar.gz
bcm5719-llvm-e868123d8fd38a131d7f2c5fec7d71c1cdbb9b1e.zip
Linker: Add flag to override linkage rules
Add a flag to lib/Linker (and `llvm-link`) to override linkage rules. When set, the functions in the source module *always* replace those in the destination module. The `llvm-link` option is `-override=abc.ll`. All the "regular" modules are loaded and linked first, followed by the `-override` modules. This is useful for debugging workflows where some subset of the module (e.g., a single function) is extracted into a separate file where it's optimized differently, before being merged back in. Patch by Luqman Aden! llvm-svn: 235473
Diffstat (limited to 'llvm/test/Linker/Inputs/override-with-internal-linkage-2.ll')
-rw-r--r--llvm/test/Linker/Inputs/override-with-internal-linkage-2.ll4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/test/Linker/Inputs/override-with-internal-linkage-2.ll b/llvm/test/Linker/Inputs/override-with-internal-linkage-2.ll
new file mode 100644
index 00000000000..2f54a1511fa
--- /dev/null
+++ b/llvm/test/Linker/Inputs/override-with-internal-linkage-2.ll
@@ -0,0 +1,4 @@
+define internal i32 @foo(i32 %i) {
+entry:
+ ret i32 4
+}
OpenPOWER on IntegriCloud