ir: remove old cgo related code

There is now a custom implementation of CGo based on libclang.
This commit is contained in:
Ayke van Laethem
2019-02-09 13:46:19 +01:00
committed by Ron Evans
parent 07733ca056
commit 856e5fa179
2 changed files with 2 additions and 20 deletions
+2 -2
View File
@@ -73,7 +73,7 @@ func (p *Program) SimpleDCE() {
worklist := []*ssa.Function{main}
for _, f := range p.Functions {
if f.exported || f.Synthetic == "package initializer" || f.Pkg == runtimePkg || (f.Pkg == mathPkg && f.Pkg != nil) {
if f.flag || isCGoInternal(f.Name()) {
if f.flag {
continue
}
f.flag = true
@@ -103,7 +103,7 @@ func (p *Program) SimpleDCE() {
}
}
for _, operand := range instr.Operands(nil) {
if operand == nil || *operand == nil || isCGoInternal((*operand).Name()) {
if operand == nil || *operand == nil {
continue
}
switch operand := (*operand).(type) {