|
@@ -27,8 +27,6 @@
|
|
|
#include "llvm/IR/MDBuilder.h"
|
|
|
#include "llvm/IR/Metadata.h"
|
|
|
#include "llvm/IR/Module.h"
|
|
|
-#include "dxc/HLSL/HLModule.h" // HLSL Change
|
|
|
-#include "dxc/DXIL/DxilModule.h" // HLSL Change
|
|
|
#include "llvm/Support/ManagedStatic.h"
|
|
|
#include "llvm/Support/RWMutex.h"
|
|
|
#include "llvm/Support/StringPool.h"
|
|
@@ -237,14 +235,12 @@ Type *Function::getReturnType() const {
|
|
|
}
|
|
|
|
|
|
void Function::removeFromParent() {
|
|
|
- if (getParent()->HasHLModule()) getParent()->GetHLModule().RemoveFunction(this); // HLSL Change
|
|
|
- if (getParent()->HasDxilModule()) getParent()->GetDxilModule().RemoveFunction(this); // HLSL Change
|
|
|
+ getParent()->RemoveFunctionHook(this); // HLSL Change
|
|
|
getParent()->getFunctionList().remove(this);
|
|
|
}
|
|
|
|
|
|
void Function::eraseFromParent() {
|
|
|
- if (getParent()->HasHLModule()) getParent()->GetHLModule().RemoveFunction(this); // HLSL Change
|
|
|
- if (getParent()->HasDxilModule()) getParent()->GetDxilModule().RemoveFunction(this); // HLSL Change
|
|
|
+ getParent()->RemoveFunctionHook(this); // HLSL Change
|
|
|
getParent()->getFunctionList().erase(this);
|
|
|
}
|
|
|
|