Add enums as global variables in the IR metadata.
authorAmy Huang <akhuang@google.com>
Thu, 30 May 2019 22:04:11 +0000 (22:04 +0000)
committerAmy Huang <akhuang@google.com>
Thu, 30 May 2019 22:04:11 +0000 (22:04 +0000)
commitdd3a9caf477a01375b9a30416aed834cf85ed3ae
treec73599a5043d0a2f6a3cd1a333893622ee36bc21
parent48998d10e089bb20ff1e47fcf573b58602b285b2
Add enums as global variables in the IR metadata.

Summary:
Keeps track of the enums that were used by saving them as DIGlobalVariables,
since CodeView emits debug info for global constants.

Reviewers: rnk

Subscribers: aprantl, cfe-commits, llvm-commits

Tags: #clang, #llvm

Differential Revision: https://reviews.llvm.org/D62635

llvm-svn: 362166
clang/lib/CodeGen/CGDebugInfo.cpp
clang/test/CodeGenCXX/debug-info-enum.cpp
llvm/test/DebugInfo/COFF/global-constants.ll