Skip to content

Commit e0094ac

Browse files
committed
[IR] Move trivial accessor Module::getDataLayout into header
1 parent b85a9b3 commit e0094ac

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

llvm/include/llvm/IR/Module.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ class LLVM_EXTERNAL_VISIBILITY Module {
251251
}
252252

253253
/// Get the data layout for the module's target platform.
254-
const DataLayout &getDataLayout() const;
254+
const DataLayout &getDataLayout() const { return DL; }
255255

256256
/// Get the target triple which is a string describing the target host.
257257
/// @returns a string containing the target triple.

llvm/lib/IR/Module.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,8 +395,6 @@ void Module::setDataLayout(StringRef Desc) {
395395

396396
void Module::setDataLayout(const DataLayout &Other) { DL = Other; }
397397

398-
const DataLayout &Module::getDataLayout() const { return DL; }
399-
400398
DICompileUnit *Module::debug_compile_units_iterator::operator*() const {
401399
return cast<DICompileUnit>(CUs->getOperand(Idx));
402400
}

0 commit comments

Comments
 (0)