summaryrefslogtreecommitdiffstats
path: root/clang/lib/Index/CommentToXML.cpp
diff options
context:
space:
mode:
authorSean Callanan <scallanan@apple.com>2015-10-03 09:09:01 +0000
committerSean Callanan <scallanan@apple.com>2015-10-03 09:09:01 +0000
commit9fda9d2177abd04e272d0f512555d3eca9e36426 (patch)
tree6f6547a919e7e5fd8ad46fc728667ca865300474 /clang/lib/Index/CommentToXML.cpp
parent5860fe1bfba1561a7115e7bc0be2892eb0817013 (diff)
downloadbcm5719-llvm-9fda9d2177abd04e272d0f512555d3eca9e36426.tar.gz
bcm5719-llvm-9fda9d2177abd04e272d0f512555d3eca9e36426.zip
Add PersistentVariableDelegate to handle language-specific dematerialization.
The concept here is that languages may have different ways of communicating results. In particular, languages may have different names for their result variables and in fact may have multiple types of result variables (e.g., error results). Materializer was tied to one specific model of result handling. Instead, now UserExpressions can register their own handlers for the result variables they inject. This allows language-specific code in Materializer to be moved into the expression parser plug-in, and it simplifies Materializer. These delegates are subclasses of PersistentVariableDelegate. PersistentVariableDelegate can provide the name of the result variable, and is notified when the result variable is populated. It can also be used to touch persistent variables if need be, updating language-specific state. The UserExpression owns the delegate and can decide on its result based on consulting all of its (potentially multiple) delegates. The user expression itself now makes the determination of what the final result of the expression is, rather than relying on the Materializer, and I've added a virtual function to UserExpression to allow this. llvm-svn: 249233
Diffstat (limited to 'clang/lib/Index/CommentToXML.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud