summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/FunctionImport/funcimport.ll
diff options
context:
space:
mode:
authorTeresa Johnson <tejohnson@google.com>2016-01-12 00:24:24 +0000
committerTeresa Johnson <tejohnson@google.com>2016-01-12 00:24:24 +0000
commit5fe40050bda3eeff49145ce34a5ea85b8880b54e (patch)
tree69a70fcb57b582297838b67b1a1d91e5b59d1ebf /llvm/test/Transforms/FunctionImport/funcimport.ll
parentb15b5e92189aaff65e726f610dedb9f4e95ebeae (diff)
downloadbcm5719-llvm-5fe40050bda3eeff49145ce34a5ea85b8880b54e.tar.gz
bcm5719-llvm-5fe40050bda3eeff49145ce34a5ea85b8880b54e.zip
[IRMover] Don't copy personality, etc unless creating def
Function::copyAttributesFrom will copy the personality function, prefix data and prolog data from the source function to the new function, and is invoked when the IRMover copies the function prototype. This puts a reference to a constant in the source module on a function in the dest module, which causes an error when deleting the source module after importing, since the personality function in the source module still has uses (this would presumably also be an issue for the prologue and prefix data). Remove the copies added to the dest copy when creating the new prototype, as they are mapped properly when/if we link the function body. llvm-svn: 257420
Diffstat (limited to 'llvm/test/Transforms/FunctionImport/funcimport.ll')
-rw-r--r--llvm/test/Transforms/FunctionImport/funcimport.ll2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/test/Transforms/FunctionImport/funcimport.ll b/llvm/test/Transforms/FunctionImport/funcimport.ll
index c099b976647..52fd53d3f31 100644
--- a/llvm/test/Transforms/FunctionImport/funcimport.ll
+++ b/llvm/test/Transforms/FunctionImport/funcimport.ll
@@ -73,3 +73,5 @@ declare void @callfuncptr(...) #1
; CHECK-DAG: declare void @weakfunc(...)
declare void @weakfunc(...) #1
+; INSTLIMDEF-DAG: define available_externally hidden void @funcwithpersonality.llvm.2() personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
+; INSTLIM5-DAG: declare hidden void @funcwithpersonality.llvm.2()
OpenPOWER on IntegriCloud