[PATCH] D119828: [flang][nfc] Update D119555 comments and use getVoidPtr
Jean Perier via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 15 09:29:34 PST 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rG5bde97b17e75: [flang][nfc] Update D119555 comments and use getVoidPtr (authored by jeanPerier).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119828/new/
https://reviews.llvm.org/D119828
Files:
flang/include/flang/Optimizer/Support/InternalNames.h
flang/include/flang/Semantics/runtime-type-info.h
flang/lib/Optimizer/CodeGen/CodeGen.cpp
Index: flang/lib/Optimizer/CodeGen/CodeGen.cpp
===================================================================
--- flang/lib/Optimizer/CodeGen/CodeGen.cpp
+++ flang/lib/Optimizer/CodeGen/CodeGen.cpp
@@ -1667,18 +1667,18 @@
return rewriter.create<mlir::LLVM::AddressOfOp>(loc, ty,
global.getSymName());
}
- auto i8Ty = rewriter.getIntegerType(8);
if (fir::NameUniquer::belongsToModule(
name, Fortran::semantics::typeInfoBuiltinModule)) {
// Type info derived types do not have type descriptors since they are the
// types defining type descriptors.
- auto i8PtrTy = mlir::LLVM::LLVMPointerType::get(i8Ty);
- return rewriter.create<mlir::LLVM::NullOp>(loc, i8PtrTy);
+ return rewriter.create<mlir::LLVM::NullOp>(
+ loc, ::getVoidPtrType(box.getContext()));
}
// The global does not exist in the current translation unit, but may be
// defined elsewhere (e.g., type defined in a module).
// Create an available_externally global to require the symbols to be
// defined elsewhere and to cause link-time failure otherwise.
+ auto i8Ty = rewriter.getIntegerType(8);
mlir::OpBuilder modBuilder(module.getBodyRegion());
modBuilder.create<mlir::LLVM::GlobalOp>(
loc, i8Ty, /*isConstant=*/true,
Index: flang/include/flang/Semantics/runtime-type-info.h
===================================================================
--- flang/include/flang/Semantics/runtime-type-info.h
+++ flang/include/flang/Semantics/runtime-type-info.h
@@ -33,8 +33,8 @@
RuntimeDerivedTypeTables BuildRuntimeDerivedTypeTables(SemanticsContext &);
-// Name of the builtin module that defines builtin derived types meant
-// to describe other derived types at runtime in flang descriptor.
+/// Name of the builtin module that defines builtin derived types meant
+/// to describe other derived types at runtime in flang descriptor.
constexpr char typeInfoBuiltinModule[]{"__fortran_type_info"};
} // namespace Fortran::semantics
Index: flang/include/flang/Optimizer/Support/InternalNames.h
===================================================================
--- flang/include/flang/Optimizer/Support/InternalNames.h
+++ flang/include/flang/Optimizer/Support/InternalNames.h
@@ -133,7 +133,7 @@
/// Check whether the name should be re-mangle with external ABI convention.
static bool needExternalNameMangling(llvm::StringRef uniquedName);
- /// Does \p uniquedName belong to module \p moduleName ?
+ /// Does \p uniquedName belong to module \p moduleName?
static bool belongsToModule(llvm::StringRef uniquedName,
llvm::StringRef moduleName);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119828.408924.patch
Type: text/x-patch
Size: 2735 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220215/babdcc24/attachment.bin>
More information about the llvm-commits
mailing list