transform: do not track const globals

This commit is contained in:
Jaden Weiss
2020-02-24 15:04:51 -05:00
committed by GitHub
parent c0b8716d7f
commit 67229af879
3 changed files with 13 additions and 5 deletions
+1 -1
View File
@@ -271,7 +271,7 @@ func AddGlobalsBitmap(mod llvm.Module) bool {
var trackedGlobals []llvm.Value
var trackedGlobalTypes []llvm.Type
for global := mod.FirstGlobal(); !global.IsNil(); global = llvm.NextGlobal(global) {
if global.IsDeclaration() {
if global.IsDeclaration() || global.IsGlobalConstant() {
continue
}
typ := global.Type().ElementType()