| Index: src/PNaClTranslator.cpp
|
| diff --git a/src/PNaClTranslator.cpp b/src/PNaClTranslator.cpp
|
| index c1a59193eeb150d43872ba22d3a49b3ec61269b8..6b51b00224ce1f648bffaa9938980951506607b7 100644
|
| --- a/src/PNaClTranslator.cpp
|
| +++ b/src/PNaClTranslator.cpp
|
| @@ -475,7 +475,15 @@ private:
|
|
|
| // Converts function declarations into constant value IDs.
|
| void createValueIDsForFunctions() {
|
| + Ice::GlobalContext *Ctx = getTranslator().getContext();
|
| for (const Ice::FunctionDeclaration *Func : FunctionDeclarations) {
|
| + if (!Func->verifyLinkageCorrect(Ctx)) {
|
| + std::string Buffer;
|
| + raw_string_ostream StrBuf(Buffer);
|
| + StrBuf << "Bad linkage for function " << Func->getName();
|
| + Error(StrBuf.str());
|
| + continue;
|
| + }
|
| Ice::Constant *C = nullptr;
|
| if (!isIRGenerationDisabled()) {
|
| C = getConstantSym(Func->getName(), Func->getSuppressMangling(),
|
| @@ -487,7 +495,14 @@ private:
|
|
|
| // Converts global variable declarations into constant value IDs.
|
| void createValueIDsForGlobalVars() {
|
| + Ice::GlobalContext *Ctx = getTranslator().getContext();
|
| for (const Ice::VariableDeclaration *Decl : *VariableDeclarations) {
|
| + if (!Decl->verifyLinkageCorrect(Ctx)) {
|
| + std::string Buffer;
|
| + raw_string_ostream StrBuf(Buffer);
|
| + StrBuf << "Bad linkage for global " << Decl->getName();
|
| + Error(StrBuf.str());
|
| + }
|
| Ice::Constant *C = nullptr;
|
| if (!isIRGenerationDisabled()) {
|
| C = getConstantSym(Decl->getName(), Decl->getSuppressMangling(),
|
|
|