r256582 - [MS ABI] Mark an unreachable path appropriately
David Majnemer via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 29 14:02:10 PST 2015
Author: majnemer
Date: Tue Dec 29 16:02:10 2015
New Revision: 256582
URL: http://llvm.org/viewvc/llvm-project?rev=256582&view=rev
Log:
[MS ABI] Mark an unreachable path appropriately
No functional change is intended, just a small cleanup.
Modified:
cfe/trunk/lib/AST/MicrosoftMangle.cpp
Modified: cfe/trunk/lib/AST/MicrosoftMangle.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/MicrosoftMangle.cpp?rev=256582&r1=256581&r2=256582&view=diff
==============================================================================
--- cfe/trunk/lib/AST/MicrosoftMangle.cpp (original)
+++ cfe/trunk/lib/AST/MicrosoftMangle.cpp Tue Dec 29 16:02:10 2015
@@ -395,14 +395,8 @@ void MicrosoftCXXNameMangler::mangle(con
mangleFunctionEncoding(FD, Context.shouldMangleDeclName(FD));
else if (const VarDecl *VD = dyn_cast<VarDecl>(D))
mangleVariableEncoding(VD);
- else {
- // TODO: Fields? Can MSVC even mangle them?
- // Issue a diagnostic for now.
- DiagnosticsEngine &Diags = Context.getDiags();
- unsigned DiagID = Diags.getCustomDiagID(
- DiagnosticsEngine::Error, "cannot mangle this declaration yet");
- Diags.Report(D->getLocation(), DiagID) << D->getSourceRange();
- }
+ else
+ llvm_unreachable("Tried to mangle unexpected NamedDecl!");
}
void MicrosoftCXXNameMangler::mangleFunctionEncoding(const FunctionDecl *FD,
More information about the cfe-commits
mailing list