diff --git a/lib/Bytecode/Reader/Reader.cpp b/lib/Bytecode/Reader/Reader.cpp index c8bf5af72e9..60116af7ac8 100644 --- a/lib/Bytecode/Reader/Reader.cpp +++ b/lib/Bytecode/Reader/Reader.cpp @@ -306,7 +306,7 @@ bool BytecodeParser::ParseFunction(const uchar *&Buf, const uchar *EndBuf) { if (!hasInternalMarkerOnly) { unsigned LinkageType; if (read_vbr(Buf, EndBuf, LinkageType)) return true; - if (LinkageType & 0x3) return true; + if (LinkageType & ~0x3) return true; Linkage = (GlobalValue::LinkageTypes)LinkageType; } else { // We used to only support two linkage models: internal and external