compiler: change symbol name for string and packed data constants

This new symbol name format (package name + "$string" or "$pack" suffix)
is easier to parse for analysis.
This commit is contained in:
Ayke van Laethem
2021-10-29 04:09:38 +02:00
committed by Ron Evans
parent 7c24925aa7
commit f63c389f1a
6 changed files with 23 additions and 22 deletions
+2 -2
View File
@@ -5,7 +5,7 @@ target triple = "wasm32-unknown-wasi"
%runtime._string = type { i8*, i32 }
@"main.someString$string" = internal unnamed_addr constant [3 x i8] c"foo", align 1
@"main$string" = internal unnamed_addr constant [3 x i8] c"foo", align 1
declare noalias nonnull i8* @runtime.alloc(i32, i8*, i8*, i8*)
@@ -18,7 +18,7 @@ entry:
; Function Attrs: nounwind
define hidden %runtime._string @main.someString(i8* %context, i8* %parentHandle) unnamed_addr #0 {
entry:
ret %runtime._string { i8* getelementptr inbounds ([3 x i8], [3 x i8]* @"main.someString$string", i32 0, i32 0), i32 3 }
ret %runtime._string { i8* getelementptr inbounds ([3 x i8], [3 x i8]* @"main$string", i32 0, i32 0), i32 3 }
}
; Function Attrs: nounwind