forked from OSchip/llvm-project
[OPENMP] Require valid SourceLocation in function call, NFC.
Removed default empty SourceLocation argument from `emitCall` function and require valid location. llvm-svn: 325812
This commit is contained in:
parent
8831f6e57d
commit
7ef47a67a5
|
@ -8057,9 +8057,10 @@ void CGOpenMPRuntime::emitDoacrossOrdered(CodeGenFunction &CGF,
|
||||||
CGF.EmitRuntimeCall(RTLFn, Args);
|
CGF.EmitRuntimeCall(RTLFn, Args);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGOpenMPRuntime::emitCall(CodeGenFunction &CGF, llvm::Value *Callee,
|
void CGOpenMPRuntime::emitCall(CodeGenFunction &CGF, SourceLocation Loc,
|
||||||
ArrayRef<llvm::Value *> Args,
|
llvm::Value *Callee,
|
||||||
SourceLocation Loc) const {
|
ArrayRef<llvm::Value *> Args) const {
|
||||||
|
assert(Loc.isValid() && "Outlined function call location must be valid.");
|
||||||
auto DL = ApplyDebugLocation::CreateDefaultArtificial(CGF, Loc);
|
auto DL = ApplyDebugLocation::CreateDefaultArtificial(CGF, Loc);
|
||||||
|
|
||||||
if (auto *Fn = dyn_cast<llvm::Function>(Callee)) {
|
if (auto *Fn = dyn_cast<llvm::Function>(Callee)) {
|
||||||
|
@ -8074,8 +8075,7 @@ void CGOpenMPRuntime::emitCall(CodeGenFunction &CGF, llvm::Value *Callee,
|
||||||
void CGOpenMPRuntime::emitOutlinedFunctionCall(
|
void CGOpenMPRuntime::emitOutlinedFunctionCall(
|
||||||
CodeGenFunction &CGF, SourceLocation Loc, llvm::Value *OutlinedFn,
|
CodeGenFunction &CGF, SourceLocation Loc, llvm::Value *OutlinedFn,
|
||||||
ArrayRef<llvm::Value *> Args) const {
|
ArrayRef<llvm::Value *> Args) const {
|
||||||
assert(Loc.isValid() && "Outlined function call location must be valid.");
|
emitCall(CGF, Loc, OutlinedFn, Args);
|
||||||
emitCall(CGF, OutlinedFn, Args, Loc);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Address CGOpenMPRuntime::getParameterAddress(CodeGenFunction &CGF,
|
Address CGOpenMPRuntime::getParameterAddress(CodeGenFunction &CGF,
|
||||||
|
|
|
@ -251,9 +251,8 @@ protected:
|
||||||
virtual StringRef getOutlinedHelperName() const { return ".omp_outlined."; }
|
virtual StringRef getOutlinedHelperName() const { return ".omp_outlined."; }
|
||||||
|
|
||||||
/// Emits \p Callee function call with arguments \p Args with location \p Loc.
|
/// Emits \p Callee function call with arguments \p Args with location \p Loc.
|
||||||
void emitCall(CodeGenFunction &CGF, llvm::Value *Callee,
|
void emitCall(CodeGenFunction &CGF, SourceLocation Loc, llvm::Value *Callee,
|
||||||
ArrayRef<llvm::Value *> Args = llvm::None,
|
ArrayRef<llvm::Value *> Args = llvm::None) const;
|
||||||
SourceLocation Loc = SourceLocation()) const;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/// \brief Default const ident_t object used for initialization of all other
|
/// \brief Default const ident_t object used for initialization of all other
|
||||||
|
|
Loading…
Reference in New Issue