diff options
| author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-07-10 22:43:42 +0000 |
|---|---|---|
| committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2015-07-10 22:43:42 +0000 |
| commit | 754e21f24462b5690707580d5f14220ea363ee19 (patch) | |
| tree | becc3083c9af013863bec6c056d8da39d9d435a6 /llvm/lib/Target/AMDGPU | |
| parent | bb57d73805449f9c36de2bd14a44e8cd4ff36d4a (diff) | |
| download | bcm5719-llvm-754e21f24462b5690707580d5f14220ea363ee19.tar.gz bcm5719-llvm-754e21f24462b5690707580d5f14220ea363ee19.zip | |
MC: Remove MCSubtargetInfo() default constructor
Force all creators of `MCSubtargetInfo` to immediately initialize it,
merging the default constructor and the initializer into an initializing
constructor. Besides cleaning up the code a little, this makes it clear
that the initializer is never called again later.
Out-of-tree backends need a trivial change: instead of calling:
auto *X = new MCSubtargetInfo();
InitXYZMCSubtargetInfo(X, ...);
return X;
they should call:
return createXYZMCSubtargetInfoImpl(...);
There's no real functionality change here.
llvm-svn: 241957
Diffstat (limited to 'llvm/lib/Target/AMDGPU')
| -rw-r--r-- | llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCTargetDesc.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCTargetDesc.cpp b/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCTargetDesc.cpp index 24976b46fae..c709741f377 100644 --- a/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCTargetDesc.cpp +++ b/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCTargetDesc.cpp @@ -52,9 +52,7 @@ static MCRegisterInfo *createAMDGPUMCRegisterInfo(const Triple &TT) { static MCSubtargetInfo * createAMDGPUMCSubtargetInfo(const Triple &TT, StringRef CPU, StringRef FS) { - MCSubtargetInfo * X = new MCSubtargetInfo(); - InitAMDGPUMCSubtargetInfo(X, TT, CPU, FS); - return X; + return createAMDGPUMCSubtargetInfoImpl(TT, CPU, FS); } static MCCodeGenInfo *createAMDGPUMCCodeGenInfo(const Triple &TT, |

