[llvm-commits] [dragonegg] r154023 - /dragonegg/trunk/src/Aliasing.cpp
Duncan Sands
baldrick at free.fr
Wed Apr 4 09:38:30 PDT 2012
Author: baldrick
Date: Wed Apr 4 11:38:30 2012
New Revision: 154023
URL: http://llvm.org/viewvc/llvm-project?rev=154023&view=rev
Log:
Don't crash and produce a decent name if passed a type.
Modified:
dragonegg/trunk/src/Aliasing.cpp
Modified: dragonegg/trunk/src/Aliasing.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/Aliasing.cpp?rev=154023&r1=154022&r2=154023&view=diff
==============================================================================
--- dragonegg/trunk/src/Aliasing.cpp (original)
+++ dragonegg/trunk/src/Aliasing.cpp Wed Apr 4 11:38:30 2012
@@ -145,8 +145,9 @@
// Create metadata describing the new node hanging off root. The name doesn't
// matter much but needs to be unique for the compilation unit.
+ tree type = TYPE_CANONICAL(TYPE_MAIN_VARIANT(TYPE_P(t) ? t : TREE_TYPE(t)));
std::string TreeName = ("alias set " + Twine(alias_set) + ": " +
- getDescriptiveName(TYPE_CANONICAL(main_type(t)))).str();
+ getDescriptiveName(type)).str();
Value *Ops[2] = { MDString::get(Context, TreeName), getTBAARoot() };
MDNode *AliasTag = MDNode::get(Context, Ops);
NodeTags[alias_set] = AliasTag;
More information about the llvm-commits
mailing list