diff options
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r-- | clang/lib/CodeGen/CGOpenMPRuntime.cpp | 13 | ||||
-rw-r--r-- | clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp | 6 |
2 files changed, 10 insertions, 9 deletions
diff --git a/clang/lib/CodeGen/CGOpenMPRuntime.cpp b/clang/lib/CodeGen/CGOpenMPRuntime.cpp index 572fd193856..a0b3ee5ab01 100644 --- a/clang/lib/CodeGen/CGOpenMPRuntime.cpp +++ b/clang/lib/CodeGen/CGOpenMPRuntime.cpp @@ -59,7 +59,7 @@ public: virtual const VarDecl *getThreadIDVariable() const = 0; /// \brief Emit the captured statement body. - void EmitBody(CodeGenFunction &CGF, const Stmt *S) override; + virtual void EmitBody(CodeGenFunction &CGF, const Stmt *S) override; /// \brief Get an LValue for the current ThreadID variable. /// \return LValue for thread id variable. This LValue always has type int32*. @@ -156,7 +156,7 @@ public: return OuterRegionInfo->getContextValue(); llvm_unreachable("No context value for inlined OpenMP region"); } - void setContextValue(llvm::Value *V) override { + virtual void setContextValue(llvm::Value *V) override { if (OuterRegionInfo) { OuterRegionInfo->setContextValue(V); return; @@ -229,7 +229,7 @@ public: } }; -} // anonymous namespace +} // namespace LValue CGOpenMPRegionInfo::getThreadIDVariableLValue(CodeGenFunction &CGF) { return CGF.MakeNaturalAlignAddrLValue( @@ -1283,7 +1283,7 @@ public: CGF.EmitRuntimeCall(Callee, Args); } }; -} // anonymous namespace +} // namespace void CGOpenMPRuntime::emitCriticalRegion(CodeGenFunction &CGF, StringRef CriticalName, @@ -1831,7 +1831,7 @@ enum KmpTaskTFields { /// \brief Function with call of destructors for private variables. KmpTaskTDestructors, }; -} // anonymous namespace +} // namespace void CGOpenMPRuntime::emitKmpRoutineEntryT(QualType KmpInt32Ty) { if (!KmpRoutineEntryPtrTy) { @@ -1866,7 +1866,7 @@ struct PrivateHelpersTy { const VarDecl *PrivateElemInit; }; typedef std::pair<CharUnits /*Align*/, PrivateHelpersTy> PrivateDataTy; -} // anonymous namespace +} // namespace static RecordDecl * createPrivatesRecordDecl(CodeGenModule &CGM, @@ -2910,3 +2910,4 @@ void CGOpenMPRuntime::emitCancelCall(CodeGenFunction &CGF, SourceLocation Loc, } } } + diff --git a/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp b/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp index a850c5ae39d..54a38308694 100644 --- a/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp +++ b/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp @@ -30,7 +30,6 @@ #include "llvm/Object/ObjectFile.h" #include "llvm/Support/TargetRegistry.h" #include <memory> - using namespace clang; #define DEBUG_TYPE "pchcontainer" @@ -140,7 +139,7 @@ public: CodeGenOpts.SplitDwarfFile = OutputFileName; } - ~PCHContainerGenerator() override = default; + virtual ~PCHContainerGenerator() {} void Initialize(ASTContext &Context) override { assert(!Ctx && "initialized multiple times"); @@ -255,7 +254,7 @@ public: } }; -} // anonymous namespace +} // namespace std::unique_ptr<ASTConsumer> ObjectFilePCHContainerWriter::CreatePCHContainerGenerator( @@ -291,4 +290,5 @@ void ObjectFilePCHContainerReader::ExtractPCH( // As a fallback, treat the buffer as a raw AST. StreamFile.init((const unsigned char *)Buffer.getBufferStart(), (const unsigned char *)Buffer.getBufferEnd()); + return; } |