@@ -3630,10 +3631,17 @@ SDValue SITargetLowering::LowerCall(CallLoweringInfo
&CLI,
std::vector Ops;
Ops.push_back(Chain);
+ bool AddTargetGlobalAddr = true;
+ // Try to find the callee in the current module.
+ if (isa(Callee)) {
+Callee = DAG.getSymbolFunctionGloba
@@ -937,27 +938,105 @@ bool CodeGenAction::loadLinkModules(CompilerInstance
&CI) {
for (const CodeGenOptions::BitcodeFileToLink &F :
CI.getCodeGenOpts().LinkBitcodeFiles) {
-auto BCBuf = CI.getFileManager().getBufferForFile(F.Filename);
-if (!BCBuf) {
+
+
@@ -596,6 +596,7 @@ static bool mustPreserveGV(const GlobalValue &GV) {
if (const Function *F = dyn_cast(&GV))
return F->isDeclaration() || F->getName().startswith("__asan_") ||
F->getName().startswith("__sanitizer_") ||
+ F->getName() == "__divti3" |
@@ -937,27 +938,105 @@ bool CodeGenAction::loadLinkModules(CompilerInstance
&CI) {
for (const CodeGenOptions::BitcodeFileToLink &F :
CI.getCodeGenOpts().LinkBitcodeFiles) {
-auto BCBuf = CI.getFileManager().getBufferForFile(F.Filename);
-if (!BCBuf) {
+
+
@@ -937,27 +938,105 @@ bool CodeGenAction::loadLinkModules(CompilerInstance
&CI) {
for (const CodeGenOptions::BitcodeFileToLink &F :
CI.getCodeGenOpts().LinkBitcodeFiles) {
-auto BCBuf = CI.getFileManager().getBufferForFile(F.Filename);
-if (!BCBuf) {
+
+
@@ -937,27 +938,105 @@ bool CodeGenAction::loadLinkModules(CompilerInstance
&CI) {
for (const CodeGenOptions::BitcodeFileToLink &F :
CI.getCodeGenOpts().LinkBitcodeFiles) {
-auto BCBuf = CI.getFileManager().getBufferForFile(F.Filename);
-if (!BCBuf) {
+
+