mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-16 08:29:08 +00:00
Simplify code a bit, add comment flyer
llvm-svn: 4238
This commit is contained in:
parent
4eec37a762
commit
9d0418d007
@ -6,7 +6,6 @@
|
||||
|
||||
#include "llvm/Analysis/DSGraph.h"
|
||||
#include "llvm/Function.h"
|
||||
#include "llvm/BasicBlock.h"
|
||||
#include "llvm/iOther.h"
|
||||
#include "llvm/DerivedTypes.h"
|
||||
#include "llvm/Target/TargetData.h"
|
||||
@ -353,21 +352,23 @@ void DSNode::mergeWith(const DSNodeHandle &NH, unsigned Offset) {
|
||||
}
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// DSCallSite Implementation
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// Define here to avoid including iOther.h and BasicBlock.h in DSGraph.h
|
||||
Function& DSCallSite::getCaller() const {
|
||||
return * callInst->getParent()->getParent();
|
||||
Function &DSCallSite::getCaller() const {
|
||||
return *callInst->getParent()->getParent();
|
||||
}
|
||||
|
||||
template<typename _CopierFunction>
|
||||
DSCallSite::DSCallSite(const DSCallSite& FromCall,
|
||||
_CopierFunction nodeCopier)
|
||||
: std::vector<DSNodeHandle>(),
|
||||
callInst(&FromCall.getCallInst()) {
|
||||
template <typename CopyFunctor>
|
||||
DSCallSite::DSCallSite(const DSCallSite &FromCall, CopyFunctor nodeCopier)
|
||||
: callInst(&FromCall.getCallInst()) {
|
||||
|
||||
reserve(FromCall.size());
|
||||
for (unsigned j = 0, ej = FromCall.size(); j != ej; ++j)
|
||||
push_back((&nodeCopier == (_CopierFunction*) 0)? DSNodeHandle(FromCall[j])
|
||||
: nodeCopier(&FromCall[j]));
|
||||
push_back(&nodeCopier == 0 ? DSNodeHandle(FromCall[j])
|
||||
: nodeCopier(&FromCall[j]));
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user