diff --git a/llvm/include/llvm/MC/StringTableBuilder.h b/llvm/include/llvm/MC/StringTableBuilder.h index 3164351d6564..f38247702eb3 100644 --- a/llvm/include/llvm/MC/StringTableBuilder.h +++ b/llvm/include/llvm/MC/StringTableBuilder.h @@ -41,7 +41,7 @@ public: /// \brief Retrieve the string table data. Can only be used after the table /// is finalized. - StringRef data() { + StringRef data() const { assert(isFinalized()); return StringTable; }