aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
diff options
context:
space:
mode:
authorChris Bieneman <chris.bieneman@me.com>2022-04-14 13:40:26 -0500
committerChris Bieneman <chris.bieneman@me.com>2022-04-25 17:49:43 -0500
commite6f44a3cd2735e92987f51ea59ae44f959807df4 (patch)
tree8bf8c85c39cbfc54bd3de5429bdf14147f7f620b /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
parent987cd7c3ed75b90de23ebf1845042646191f7bde (diff)
downloadllvm-e6f44a3cd2735e92987f51ea59ae44f959807df4.zip
llvm-e6f44a3cd2735e92987f51ea59ae44f959807df4.tar.gz
llvm-e6f44a3cd2735e92987f51ea59ae44f959807df4.tar.bz2
Add PointerType analysis for DirectX backend
As implemented this patch assumes that Typed pointer support remains in the llvm::PointerType class, however this could be modified to use a different subclass of llvm::Type that could be disallowed from use in other contexts. This does not rely on inserting typed pointers into the Module, it just uses the llvm::PointerType class to track and unique types. Fixes #54918 Reviewed By: kuhar Differential Revision: https://reviews.llvm.org/D122268
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
-rw-r--r--llvm/lib/Bitcode/Writer/BitcodeWriter.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
index 8131c1c..e773ba8 100644
--- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -1018,6 +1018,8 @@ void ModuleBitcodeWriter::writeTypeTable() {
TypeVals.push_back(true);
break;
}
+ case Type::DXILPointerTyID:
+ llvm_unreachable("DXIL pointers cannot be added to IR modules");
}
// Emit the finished record.