[llvm] r350142 - Add vtable anchor to classes.
Richard Trieu via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 28 18:02:13 PST 2018
Author: rtrieu
Date: Fri Dec 28 18:02:13 2018
New Revision: 350142
URL: http://llvm.org/viewvc/llvm-project?rev=350142&view=rev
Log:
Add vtable anchor to classes.
Modified:
llvm/trunk/include/llvm/CodeGen/GlobalISel/CallLowering.h
llvm/trunk/include/llvm/CodeGen/SelectionDAG.h
llvm/trunk/include/llvm/IR/DiagnosticInfo.h
llvm/trunk/include/llvm/Object/Error.h
llvm/trunk/include/llvm/Support/Error.h
llvm/trunk/include/llvm/Support/FormatVariadicDetails.h
llvm/trunk/include/llvm/Support/VirtualFileSystem.h
llvm/trunk/include/llvm/Support/raw_ostream.h
llvm/trunk/lib/CodeGen/GlobalISel/CallLowering.cpp
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
llvm/trunk/lib/IR/DiagnosticInfo.cpp
llvm/trunk/lib/Object/Error.cpp
llvm/trunk/lib/Support/Error.cpp
llvm/trunk/lib/Support/FormatVariadic.cpp
llvm/trunk/lib/Support/VirtualFileSystem.cpp
llvm/trunk/lib/Support/raw_ostream.cpp
Modified: llvm/trunk/include/llvm/CodeGen/GlobalISel/CallLowering.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/GlobalISel/CallLowering.h?rev=350142&r1=350141&r2=350142&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/GlobalISel/CallLowering.h (original)
+++ llvm/trunk/include/llvm/CodeGen/GlobalISel/CallLowering.h Fri Dec 28 18:02:13 2018
@@ -40,6 +40,7 @@ class Value;
class CallLowering {
const TargetLowering *TLI;
+ virtual void anchor();
public:
struct ArgInfo {
unsigned Reg;
@@ -108,6 +109,9 @@ public:
MachineIRBuilder &MIRBuilder;
MachineRegisterInfo &MRI;
CCAssignFn *AssignFn;
+
+ private:
+ virtual void anchor();
};
protected:
Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAG.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAG.h?rev=350142&r1=350141&r2=350142&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/SelectionDAG.h (original)
+++ llvm/trunk/include/llvm/CodeGen/SelectionDAG.h Fri Dec 28 18:02:13 2018
@@ -308,6 +308,9 @@ public:
: DAGUpdateListener(DAG), Callback(std::move(Callback)) {}
void NodeDeleted(SDNode *N, SDNode *E) override { Callback(N, E); }
+
+ private:
+ virtual void anchor();
};
/// When true, additional steps are taken to
Modified: llvm/trunk/include/llvm/IR/DiagnosticInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/DiagnosticInfo.h?rev=350142&r1=350141&r2=350142&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/DiagnosticInfo.h (original)
+++ llvm/trunk/include/llvm/IR/DiagnosticInfo.h Fri Dec 28 18:02:13 2018
@@ -101,6 +101,7 @@ private:
/// Severity gives the severity of the diagnostic.
const DiagnosticSeverity Severity;
+ virtual void anchor();
public:
DiagnosticInfo(/* DiagnosticKind */ int Kind, DiagnosticSeverity Severity)
: Kind(Kind), Severity(Severity) {}
@@ -210,6 +211,7 @@ public:
};
class DiagnosticInfoStackSize : public DiagnosticInfoResourceLimit {
+ virtual void anchor() override;
public:
DiagnosticInfoStackSize(const Function &Fn, uint64_t StackSize,
DiagnosticSeverity Severity = DS_Warning,
@@ -360,6 +362,7 @@ public:
/// Common features for diagnostics with an associated location.
class DiagnosticInfoWithLocationBase : public DiagnosticInfo {
+ virtual void anchor() override;
public:
/// \p Fn is the function where the diagnostic is being emitted. \p Loc is
/// the location information to use in the diagnostic.
@@ -598,6 +601,7 @@ operator<<(RemarkT &R,
/// Common features for diagnostics dealing with optimization remarks
/// that are used by IR passes.
class DiagnosticInfoIROptimization : public DiagnosticInfoOptimizationBase {
+ virtual void anchor() override;
public:
/// \p PassName is the name of the pass emitting this diagnostic. \p
/// RemarkName is a textual identifier for the remark (single-word,
@@ -818,6 +822,7 @@ private:
/// Diagnostic information for optimization analysis remarks related to
/// floating-point non-commutativity.
class OptimizationRemarkAnalysisFPCommute : public OptimizationRemarkAnalysis {
+ virtual void anchor();
public:
/// \p PassName is the name of the pass emitting this diagnostic. If this name
/// matches the regular expression given in -Rpass-analysis=, then the
@@ -859,6 +864,7 @@ private:
/// Diagnostic information for optimization analysis remarks related to
/// pointer aliasing.
class OptimizationRemarkAnalysisAliasing : public OptimizationRemarkAnalysis {
+ virtual void anchor();
public:
/// \p PassName is the name of the pass emitting this diagnostic. If this name
/// matches the regular expression given in -Rpass-analysis=, then the
Modified: llvm/trunk/include/llvm/Object/Error.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Object/Error.h?rev=350142&r1=350141&r2=350142&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Object/Error.h (original)
+++ llvm/trunk/include/llvm/Object/Error.h Fri Dec 28 18:02:13 2018
@@ -50,6 +50,7 @@ inline std::error_code make_error_code(o
/// Currently inherits from ECError for easy interoperability with
/// std::error_code, but this will be removed in the future.
class BinaryError : public ErrorInfo<BinaryError, ECError> {
+ virtual void anchor();
public:
static char ID;
BinaryError() {
Modified: llvm/trunk/include/llvm/Support/Error.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Error.h?rev=350142&r1=350141&r2=350142&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/Error.h (original)
+++ llvm/trunk/include/llvm/Support/Error.h Fri Dec 28 18:02:13 2018
@@ -1066,6 +1066,8 @@ private:
class ECError : public ErrorInfo<ECError> {
friend Error errorCodeToError(std::error_code);
+ virtual void anchor() override;
+
public:
void setErrorCode(std::error_code EC) { this->EC = EC; }
std::error_code convertToErrorCode() const override { return EC; }
Modified: llvm/trunk/include/llvm/Support/FormatVariadicDetails.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/FormatVariadicDetails.h?rev=350142&r1=350141&r2=350142&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/FormatVariadicDetails.h (original)
+++ llvm/trunk/include/llvm/Support/FormatVariadicDetails.h Fri Dec 28 18:02:13 2018
@@ -21,6 +21,8 @@ class Error;
namespace detail {
class format_adapter {
+ virtual void anchor();
+
protected:
virtual ~format_adapter() {}
Modified: llvm/trunk/include/llvm/Support/VirtualFileSystem.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/VirtualFileSystem.h?rev=350142&r1=350141&r2=350142&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/VirtualFileSystem.h (original)
+++ llvm/trunk/include/llvm/Support/VirtualFileSystem.h Fri Dec 28 18:02:13 2018
@@ -383,6 +383,8 @@ protected:
private:
IntrusiveRefCntPtr<FileSystem> FS;
+
+ virtual void anchor();
};
namespace detail {
Modified: llvm/trunk/include/llvm/Support/raw_ostream.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/raw_ostream.h?rev=350142&r1=350141&r2=350142&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/raw_ostream.h (original)
+++ llvm/trunk/include/llvm/Support/raw_ostream.h Fri Dec 28 18:02:13 2018
@@ -554,6 +554,8 @@ class buffer_ostream : public raw_svecto
raw_ostream &OS;
SmallVector<char, 0> Buffer;
+ virtual void anchor() override;
+
public:
buffer_ostream(raw_ostream &OS) : raw_svector_ostream(Buffer), OS(OS) {}
~buffer_ostream() override { OS << str(); }
Modified: llvm/trunk/lib/CodeGen/GlobalISel/CallLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/GlobalISel/CallLowering.cpp?rev=350142&r1=350141&r2=350142&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/GlobalISel/CallLowering.cpp (original)
+++ llvm/trunk/lib/CodeGen/GlobalISel/CallLowering.cpp Fri Dec 28 18:02:13 2018
@@ -23,6 +23,8 @@
using namespace llvm;
+void CallLowering::anchor() {}
+
bool CallLowering::lowerCall(
MachineIRBuilder &MIRBuilder, ImmutableCallSite CS, unsigned ResReg,
ArrayRef<unsigned> ArgRegs, std::function<unsigned()> GetCalleeReg) const {
@@ -180,3 +182,5 @@ unsigned CallLowering::ValueHandler::ext
}
llvm_unreachable("unable to extend register");
}
+
+void CallLowering::ValueHandler::anchor() {}
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=350142&r1=350141&r2=350142&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Fri Dec 28 18:02:13 2018
@@ -87,6 +87,8 @@ static SDVTList makeVTList(const EVT *VT
void SelectionDAG::DAGUpdateListener::NodeDeleted(SDNode*, SDNode*) {}
void SelectionDAG::DAGUpdateListener::NodeUpdated(SDNode*) {}
+void SelectionDAG::DAGNodeDeletedListener::anchor() {}
+
#define DEBUG_TYPE "selectiondag"
static cl::opt<bool> EnableMemCpyDAGOpt("enable-memcpy-dag-opt",
Modified: llvm/trunk/lib/IR/DiagnosticInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DiagnosticInfo.cpp?rev=350142&r1=350141&r2=350142&view=diff
==============================================================================
--- llvm/trunk/lib/IR/DiagnosticInfo.cpp (original)
+++ llvm/trunk/lib/IR/DiagnosticInfo.cpp Fri Dec 28 18:02:13 2018
@@ -104,6 +104,11 @@ void DiagnosticInfoPGOProfile::print(Dia
DP << getMsg();
}
+void DiagnosticInfo::anchor() {}
+void DiagnosticInfoStackSize::anchor() {}
+void DiagnosticInfoWithLocationBase::anchor() {}
+void DiagnosticInfoIROptimization::anchor() {}
+
DiagnosticLocation::DiagnosticLocation(const DebugLoc &DL) {
if (!DL)
return;
@@ -366,6 +371,9 @@ std::string DiagnosticInfoOptimizationBa
return OS.str();
}
+void OptimizationRemarkAnalysisFPCommute::anchor() {}
+void OptimizationRemarkAnalysisAliasing::anchor() {}
+
namespace llvm {
namespace yaml {
Modified: llvm/trunk/lib/Object/Error.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/Error.cpp?rev=350142&r1=350141&r2=350142&view=diff
==============================================================================
--- llvm/trunk/lib/Object/Error.cpp (original)
+++ llvm/trunk/lib/Object/Error.cpp Fri Dec 28 18:02:13 2018
@@ -57,6 +57,7 @@ std::string _object_error_category::mess
"defined.");
}
+void BinaryError::anchor() {}
char BinaryError::ID = 0;
char GenericBinaryError::ID = 0;
Modified: llvm/trunk/lib/Support/Error.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Error.cpp?rev=350142&r1=350141&r2=350142&view=diff
==============================================================================
--- llvm/trunk/lib/Support/Error.cpp (original)
+++ llvm/trunk/lib/Support/Error.cpp Fri Dec 28 18:02:13 2018
@@ -54,6 +54,7 @@ namespace llvm {
void ErrorInfoBase::anchor() {}
char ErrorInfoBase::ID = 0;
char ErrorList::ID = 0;
+void ECError::anchor() {};
char ECError::ID = 0;
char StringError::ID = 0;
char FileError::ID = 0;
Modified: llvm/trunk/lib/Support/FormatVariadic.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/FormatVariadic.cpp?rev=350142&r1=350141&r2=350142&view=diff
==============================================================================
--- llvm/trunk/lib/Support/FormatVariadic.cpp (original)
+++ llvm/trunk/lib/Support/FormatVariadic.cpp Fri Dec 28 18:02:13 2018
@@ -152,3 +152,5 @@ formatv_object_base::parseFormatString(S
}
return Replacements;
}
+
+void detail::format_adapter::anchor() { }
Modified: llvm/trunk/lib/Support/VirtualFileSystem.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/VirtualFileSystem.cpp?rev=350142&r1=350141&r2=350142&view=diff
==============================================================================
--- llvm/trunk/lib/Support/VirtualFileSystem.cpp (original)
+++ llvm/trunk/lib/Support/VirtualFileSystem.cpp Fri Dec 28 18:02:13 2018
@@ -472,6 +472,8 @@ directory_iterator OverlayFileSystem::di
std::make_shared<OverlayFSDirIterImpl>(Dir, *this, EC));
}
+void ProxyFileSystem::anchor() {}
+
namespace llvm {
namespace vfs {
Modified: llvm/trunk/lib/Support/raw_ostream.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/raw_ostream.cpp?rev=350142&r1=350141&r2=350142&view=diff
==============================================================================
--- llvm/trunk/lib/Support/raw_ostream.cpp (original)
+++ llvm/trunk/lib/Support/raw_ostream.cpp Fri Dec 28 18:02:13 2018
@@ -914,3 +914,5 @@ void raw_null_ostream::pwrite_impl(const
uint64_t Offset) {}
void raw_pwrite_stream::anchor() {}
+
+void buffer_ostream::anchor() {}
More information about the llvm-commits
mailing list