r325812 - [OPENMP] Require valid SourceLocation in function call, NFC.
Alexey Bataev via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 22 10:33:31 PST 2018
Author: abataev
Date: Thu Feb 22 10:33:31 2018
New Revision: 325812
URL: http://llvm.org/viewvc/llvm-project?rev=325812&view=rev
Log:
[OPENMP] Require valid SourceLocation in function call, NFC.
Removed default empty SourceLocation argument from `emitCall` function
and require valid location.
Modified:
cfe/trunk/lib/CodeGen/CGOpenMPRuntime.cpp
cfe/trunk/lib/CodeGen/CGOpenMPRuntime.h
Modified: cfe/trunk/lib/CodeGen/CGOpenMPRuntime.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGOpenMPRuntime.cpp?rev=325812&r1=325811&r2=325812&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGOpenMPRuntime.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGOpenMPRuntime.cpp Thu Feb 22 10:33:31 2018
@@ -8057,9 +8057,10 @@ void CGOpenMPRuntime::emitDoacrossOrdere
CGF.EmitRuntimeCall(RTLFn, Args);
}
-void CGOpenMPRuntime::emitCall(CodeGenFunction &CGF, llvm::Value *Callee,
- ArrayRef<llvm::Value *> Args,
- SourceLocation Loc) const {
+void CGOpenMPRuntime::emitCall(CodeGenFunction &CGF, SourceLocation Loc,
+ llvm::Value *Callee,
+ ArrayRef<llvm::Value *> Args) const {
+ assert(Loc.isValid() && "Outlined function call location must be valid.");
auto DL = ApplyDebugLocation::CreateDefaultArtificial(CGF, Loc);
if (auto *Fn = dyn_cast<llvm::Function>(Callee)) {
@@ -8074,8 +8075,7 @@ void CGOpenMPRuntime::emitCall(CodeGenFu
void CGOpenMPRuntime::emitOutlinedFunctionCall(
CodeGenFunction &CGF, SourceLocation Loc, llvm::Value *OutlinedFn,
ArrayRef<llvm::Value *> Args) const {
- assert(Loc.isValid() && "Outlined function call location must be valid.");
- emitCall(CGF, OutlinedFn, Args, Loc);
+ emitCall(CGF, Loc, OutlinedFn, Args);
}
Address CGOpenMPRuntime::getParameterAddress(CodeGenFunction &CGF,
Modified: cfe/trunk/lib/CodeGen/CGOpenMPRuntime.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGOpenMPRuntime.h?rev=325812&r1=325811&r2=325812&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGOpenMPRuntime.h (original)
+++ cfe/trunk/lib/CodeGen/CGOpenMPRuntime.h Thu Feb 22 10:33:31 2018
@@ -251,9 +251,8 @@ protected:
virtual StringRef getOutlinedHelperName() const { return ".omp_outlined."; }
/// Emits \p Callee function call with arguments \p Args with location \p Loc.
- void emitCall(CodeGenFunction &CGF, llvm::Value *Callee,
- ArrayRef<llvm::Value *> Args = llvm::None,
- SourceLocation Loc = SourceLocation()) const;
+ void emitCall(CodeGenFunction &CGF, SourceLocation Loc, llvm::Value *Callee,
+ ArrayRef<llvm::Value *> Args = llvm::None) const;
private:
/// \brief Default const ident_t object used for initialization of all other
More information about the cfe-commits
mailing list