diff options
author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2015-12-04 00:45:43 +0000 |
---|---|---|
committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2015-12-04 00:45:43 +0000 |
commit | 2bb9c5ca221efe2c1ad77e85f13d8531c457807f (patch) | |
tree | 34ba78123475c1d2c81b9c92936c9ef6e20f83c7 /llvm/test/CodeGen/Generic | |
parent | d6487b23a9c0caa059898e0a497393fb824966aa (diff) | |
download | bcm5719-llvm-2bb9c5ca221efe2c1ad77e85f13d8531c457807f.tar.gz bcm5719-llvm-2bb9c5ca221efe2c1ad77e85f13d8531c457807f.zip |
Emit function alias to data as a function symbol.
CFI emits jump slots for indirect functions as a byte array
constant, and declares function-typed aliases to these constants.
This change fixes AsmPrinter to emit these aliases as function
symbols and not data symbols.
llvm-svn: 254674
Diffstat (limited to 'llvm/test/CodeGen/Generic')
-rw-r--r-- | llvm/test/CodeGen/Generic/function-alias.ll | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/Generic/function-alias.ll b/llvm/test/CodeGen/Generic/function-alias.ll new file mode 100644 index 00000000000..d68d75d5578 --- /dev/null +++ b/llvm/test/CodeGen/Generic/function-alias.ll @@ -0,0 +1,12 @@ +; RUN: llc < %s | FileCheck %s +target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-unknown-linux-gnu" + +; "data" constant +@0 = private constant <{ i8, i8 }> <{i8 15, i8 11}>, section ".text" + +; function-typed alias +@ud2 = alias void (), bitcast (<{ i8, i8 }>* @0 to void ()*) + +; Check that "ud2" is emitted as a function symbol. +; CHECK: .type{{.*}}ud2,@function |