1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

[AST] Move a function definition into the cpp [NFC]

llvm-svn: 340382
This commit is contained in:
Philip Reames 2018-08-22 03:32:52 +00:00
parent c8eea01630
commit d401425eb2
2 changed files with 13 additions and 11 deletions

View File

@ -220,17 +220,7 @@ public:
/// If this alias set is known to contain a single instruction and *only* a
/// single unique instruction, return it. Otherwise, return nullptr.
Instruction* getUniqueInstruction() {
if (size() != 0)
// Can't track source of pointer, might be many instruction
return nullptr;
if (AliasAny)
// May have collapses alias set
return nullptr;
if (1 != UnknownInsts.size())
return nullptr;
return cast<Instruction>(UnknownInsts[0]);
}
Instruction* getUniqueInstruction();
void print(raw_ostream &OS) const;
void dump() const;

View File

@ -252,6 +252,18 @@ bool AliasSet::aliasesUnknownInst(const Instruction *Inst,
return false;
}
Instruction* AliasSet::getUniqueInstruction() {
if (size() != 0)
// Can't track source of pointer, might be many instruction
return nullptr;
if (AliasAny)
// May have collapses alias set
return nullptr;
if (1 != UnknownInsts.size())
return nullptr;
return cast<Instruction>(UnknownInsts[0]);
}
void AliasSetTracker::clear() {
// Delete all the PointerRec entries.
for (PointerMapType::iterator I = PointerMap.begin(), E = PointerMap.end();